fix(system):修复字典更新逻辑中的代码冲突
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
package com.youlai.boot.system.controller;
|
package com.youlai.boot.system.controller;
|
||||||
|
|
||||||
import com.youlai.boot.common.result.Result;
|
import com.youlai.boot.core.web.Result;
|
||||||
import com.youlai.boot.system.service.UserOnlineService;
|
import com.youlai.boot.system.service.UserOnlineService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@@ -52,4 +52,4 @@ public class UserOnlineController {
|
|||||||
"count", userOnlineService.getOnlineUserCount()
|
"count", userOnlineService.getOnlineUserCount()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,11 +116,7 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements Di
|
|||||||
throw new BusinessException("字典不存在");
|
throw new BusinessException("字典不存在");
|
||||||
}
|
}
|
||||||
// 校验 code 是否唯一
|
// 校验 code 是否唯一
|
||||||
<<<<<<< HEAD
|
|
||||||
String dictCode = dictForm.getCode();
|
|
||||||
=======
|
|
||||||
String dictCode = dictForm.getDictCode();
|
String dictCode = dictForm.getDictCode();
|
||||||
>>>>>>> 95412501fc69777ad7db6fef970b479c9651984d
|
|
||||||
if (!entity.getDictCode().equals(dictCode)) {
|
if (!entity.getDictCode().equals(dictCode)) {
|
||||||
long count = this.count(new LambdaQueryWrapper<Dict>()
|
long count = this.count(new LambdaQueryWrapper<Dict>()
|
||||||
.eq(Dict::getDictCode, dictCode)
|
.eq(Dict::getDictCode, dictCode)
|
||||||
@@ -130,9 +126,6 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements Di
|
|||||||
// 更新字典
|
// 更新字典
|
||||||
Dict dict = dictConverter.toEntity(dictForm);
|
Dict dict = dictConverter.toEntity(dictForm);
|
||||||
dict.setId(id);
|
dict.setId(id);
|
||||||
<<<<<<< HEAD
|
|
||||||
return this.updateById(dict);
|
|
||||||
=======
|
|
||||||
boolean result = this.updateById(dict);
|
boolean result = this.updateById(dict);
|
||||||
if (result) {
|
if (result) {
|
||||||
// 更新字典数据
|
// 更新字典数据
|
||||||
@@ -152,7 +145,6 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements Di
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
>>>>>>> 95412501fc69777ad7db6fef970b479c9651984d
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user