app版本修改,过滤当前版本

This commit is contained in:
lifenlong 2021-06-17 00:28:36 +08:00
parent 841903d2a6
commit fbcd5b7470
2 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package cn.lili.modules.system.serviceimpl;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.modules.goods.entity.dos.Brand;
import cn.lili.modules.system.entity.dos.AppVersion;
import cn.lili.modules.system.mapper.AppVersionMapper;
import cn.lili.modules.system.service.AppVersionService;
@ -29,7 +30,9 @@ public class AppVersionServiceImpl extends ServiceImpl<AppVersionMapper, AppVers
@Override
public boolean checkAppVersion(AppVersion appVersion) {
//检测版本是否存在
if(null!=this.getOne(new LambdaQueryWrapper<AppVersion>().eq(AppVersion::getVersion,appVersion.getVersion()))){
if (null != this.getOne(new LambdaQueryWrapper<AppVersion>()
.eq(AppVersion::getVersion, appVersion.getVersion())
.ne(appVersion.getId() != null, AppVersion::getId, appVersion.getId()))) {
throw new ServiceException(ResultCode.APP_VERSION_EXIST);
}
return true;

View File

@ -42,7 +42,7 @@ public class StudioManagerController {
@ApiOperation(value = "获取店铺直播间详情")
@ApiImplicitParam(name = "studioId", value = "直播间ID", required = true, paramType = "path")
@GetMapping("/studioInfo/{studioId}")
@GetMapping("/{studioId}")
public ResultMessage<StudioVO> studioInfo(@PathVariable String studioId) {
return ResultUtil.data(studioService.getStudioVO(studioId));
}