package cn.sikey.tools.controller.app.version;

import cn.sikey.tools.controller.app.version.vo.AppUpgradeRespVO;
import cn.sikey.tools.controller.app.version.vo.QueryAppUpgradeReqVO;
import cn.sikey.tools.enums.CommonResult;
import cn.sikey.tools.service.appversion.AppVersionService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * APP版本升级
 */
@RestController
@RequestMapping("/tools/app")
@Slf4j
public class AppVersionController {

    @Resource
    private AppVersionService appVersionService;

    /**
     * APP版本升级
     *
     * @param req   请求参数
     * @return      CommonResult<AppUpgradeRespVO>
     */
    @GetMapping("/queryAppUpgrade")
    public CommonResult<AppUpgradeRespVO> queryAppUpgrade(@Validated QueryAppUpgradeReqVO req) {
        return appVersionService.queryAppUpgrade(req);
    }
}
