當前提交
8c3d387257
@ -108,13 +108,13 @@ public class ProductLevelController {
|
||||
ProductLevelDTO entity = productLevelService.get(dto.getId());
|
||||
QueryWrapper<ProductLevel> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.eq(ProductLevel.CODE, dto.getCode());
|
||||
if(entity.getCode()!=dto.getCode() && productLevelMapper.selectCount(wrapper1)!= 0){
|
||||
if(!entity.getCode().equals(dto.getCode()) && productLevelMapper.selectCount(wrapper1)!= 0){
|
||||
return new Result().error(1,"编码重复");
|
||||
}
|
||||
//验证名称是否重名
|
||||
QueryWrapper<ProductLevel> wrapper2 = new QueryWrapper<>();
|
||||
wrapper2.eq(ProductLevel.PRODUCT_LEVEL, dto.getProductLevel());
|
||||
if(entity.getProductLevel()!=dto.getProductLevel() && productLevelMapper.selectCount(wrapper2)!= 0){
|
||||
if(!entity.getProductLevel().equals(dto.getProductLevel()) && productLevelMapper.selectCount(wrapper2)!= 0){
|
||||
return new Result().error(1,"名称重复");
|
||||
}
|
||||
else {
|
||||
|
@ -109,14 +109,14 @@ public class ScenesController {
|
||||
ScenesDTO entity = scenesService.get(dto.getId());
|
||||
QueryWrapper<Scenes> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.eq(Scenes.CODE, dto.getCode());
|
||||
if(entity.getCode()!=dto.getCode() && scenesMapper.selectCount(wrapper1)!= 0){
|
||||
if(!entity.getCode().equals(dto.getCode()) && scenesMapper.selectCount(wrapper1)!= 0){
|
||||
return new Result().error(1,"编码重复");
|
||||
}
|
||||
//验证名称是否重名
|
||||
QueryWrapper<Scenes> wrapper2 = new QueryWrapper<>();
|
||||
wrapper2.eq(Scenes.SCENES_NAME, dto.getScenesName());
|
||||
System.out.println(scenesMapper.selectCount(wrapper2));
|
||||
if(entity.getScenesName()!=dto.getScenesName() && scenesMapper.selectCount(wrapper2)!= 0){
|
||||
if(!entity.getScenesName().equals(dto.getScenesName()) && scenesMapper.selectCount(wrapper2)!= 0){
|
||||
return new Result().error(1,"名称重复");
|
||||
}
|
||||
else {
|
||||
|
@ -106,13 +106,13 @@ public class WorkingTimeController {
|
||||
WorkingTimeDTO entity = workingTimeService.get(dto.getId());
|
||||
QueryWrapper<WorkingTime> wrapper1 = new QueryWrapper<>();
|
||||
wrapper1.eq(WorkingTime.CODE, dto.getCode());
|
||||
if(entity.getCode()!=dto.getCode() && workingTimeMapper.selectCount(wrapper1)!= 0){
|
||||
if(!entity.getCode().equals(dto.getCode()) && workingTimeMapper.selectCount(wrapper1)!= 0){
|
||||
return new Result().error(1,"编码重复");
|
||||
}
|
||||
//验证名称是否重名
|
||||
QueryWrapper<WorkingTime> wrapper2 = new QueryWrapper<>();
|
||||
wrapper2.eq( WorkingTime.ORDER_NAME, dto.getOrderName());
|
||||
if(entity.getOrderName()!=dto.getOrderName() && workingTimeMapper.selectCount(wrapper2)!= 0){
|
||||
if(!entity.getOrderName().equals(dto.getOrderName()) && workingTimeMapper.selectCount(wrapper2)!= 0){
|
||||
return new Result().error(1,"名称重复");
|
||||
}
|
||||
else {
|
||||
|
載入中…
新增問題並參考
Block a user