class AppVersionManagerController {
    @Autowired
    private AppVersionService appVersionService;


    @ApiOperation(value = "查询app升级消息", response = AppVersion.class)
    @GetMapping
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "APP类型", required = true, dataType = "type", paramType = "query")
    })
    public ResultMessage<IPage<AppVersion>> getByPage(PageVO page, String type) {
        return ResultUtil.data(this.appVersionService.page(PageUtil.initPage(page),
                new QueryWrapper<AppVersion>().eq(StringUtils.isNotEmpty(type), "type", type).orderByDesc("create_time")));
    }


    @ApiOperation(value = "添加app版本信息", response = AppVersion.class)
    @PostMapping
    public ResultMessage<Object> add(@Valid AppVersion appVersion) {<FILL_FUNCTION_BODY>}

    @PutMapping(value = "/{id}")
    @ApiOperation(value = "修改app版本信息", response = AppVersion.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "主键", required = true, dataType = "String", paramType = "path")
    })
    public ResultMessage<Object> edit(@Valid AppVersion appVersion, @PathVariable String id) {
        if(this.appVersionService.checkAppVersion(appVersion)){
            if(this.appVersionService.updateById(appVersion)){
                return ResultUtil.success();
            }
        }
        throw new ServiceException(ResultCode.ERROR);
    }

    @DeleteMapping(value = "/{id}")
    @ApiOperation(value = "删除app版本")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "要删除的app版本主键", required = true, dataType = "String", paramType = "path")
    })
    public ResultMessage<Boolean> delete(@PathVariable String id) {
        if(this.appVersionService.removeById(id)){
            return ResultUtil.success();
        }
        throw new ServiceException(ResultCode.ERROR);
    }

}


        if(this.appVersionService.checkAppVersion(appVersion)){
            if(this.appVersionService.save(appVersion)){
                return ResultUtil.success();
            }
        }
        throw new ServiceException(ResultCode.ERROR);
    
<no_super_class>