app版本修改,过滤当前版本
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user