fix:数据字典(一级),修复无法新增已删除字典Bug
This commit is contained in:
@@ -90,12 +90,14 @@ public class DictServiceImpl extends ServiceImpl<DictDao, DictEntity>
|
|||||||
@Override
|
@Override
|
||||||
public ResponseMessage add(DictVo dictVo) {
|
public ResponseMessage add(DictVo dictVo) {
|
||||||
//判断字典名是否重复
|
//判断字典名是否重复
|
||||||
Integer dicNameCount = query().eq("dic_name", dictVo.getDicName()).count();
|
Integer dicNameCount = query().eq("dic_name", dictVo.getDicName())
|
||||||
|
.eq("del_flag", 0).count();
|
||||||
if (dicNameCount > 0) {
|
if (dicNameCount > 0) {
|
||||||
return Result.error("字典名重复");
|
return Result.error("字典名重复");
|
||||||
}
|
}
|
||||||
//判断字典编码是否重复
|
//判断字典编码是否重复
|
||||||
Integer dicCodeCount = query().eq("dic_code", dictVo.getDicCode()).count();
|
Integer dicCodeCount = query().eq("dic_code", dictVo.getDicCode())
|
||||||
|
.eq("del_flag", 0).count();
|
||||||
if (dicCodeCount > 0) {
|
if (dicCodeCount > 0) {
|
||||||
return Result.error("字典编码重复");
|
return Result.error("字典编码重复");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user