APP版本升级
This commit is contained in:
@@ -7,7 +7,7 @@ import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.system.entity.dos.AppVersionDO;
|
||||
import cn.lili.modules.system.entity.dos.AppVersion;
|
||||
import cn.lili.modules.system.service.AppVersionService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -34,33 +34,33 @@ public class AppVersionManagerController {
|
||||
private AppVersionService appVersionService;
|
||||
|
||||
|
||||
@ApiOperation(value = "查询app升级消息", response = AppVersionDO.class)
|
||||
@ApiOperation(value = "查询app升级消息", response = AppVersion.class)
|
||||
@GetMapping
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "APP类型", required = true, dataType = "type", paramType = "query")
|
||||
})
|
||||
public ResultMessage<IPage<AppVersionDO>> getByPage(PageVO page, String type) {
|
||||
public ResultMessage<IPage<AppVersion>> getByPage(PageVO page, String type) {
|
||||
return ResultUtil.data(this.appVersionService.page(PageUtil.initPage(page),
|
||||
new QueryWrapper<AppVersionDO>().eq(StringUtils.isNotEmpty(type), "type", type).orderByDesc("create_time")));
|
||||
new QueryWrapper<AppVersion>().eq(StringUtils.isNotEmpty(type), "type", type).orderByDesc("create_time")));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "添加app版本信息", response = AppVersionDO.class)
|
||||
@ApiOperation(value = "添加app版本信息", response = AppVersion.class)
|
||||
@PostMapping
|
||||
public ResultMessage<Object> add(@Valid AppVersionDO appVersionDO) {
|
||||
if(this.appVersionService.save(appVersionDO)){
|
||||
public ResultMessage<Object> add(@Valid AppVersion appVersion) {
|
||||
if(this.appVersionService.save(appVersion)){
|
||||
return ResultUtil.success();
|
||||
}
|
||||
throw new ServiceException(ResultCode.ERROR);
|
||||
}
|
||||
|
||||
@PutMapping(value = "/{id}")
|
||||
@ApiOperation(value = "修改app版本信息", response = AppVersionDO.class)
|
||||
@ApiOperation(value = "修改app版本信息", response = AppVersion.class)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "主键", required = true, dataType = "String", paramType = "path")
|
||||
})
|
||||
public ResultMessage<Boolean> edit(@Valid AppVersionDO appVersionDO, @PathVariable String id) {
|
||||
if(this.appVersionService.updateById(appVersionDO)){
|
||||
public ResultMessage<Boolean> edit(@Valid AppVersion appVersion, @PathVariable String id) {
|
||||
if(this.appVersionService.updateById(appVersion)){
|
||||
return ResultUtil.success();
|
||||
}
|
||||
throw new ServiceException(ResultCode.ERROR);
|
||||
|
||||
Reference in New Issue
Block a user