修复了“字典无法给不同字典类型添加或编辑相同字典数据”的bug,现在只有同字典类型且同字典数据才会添加失败。
This commit is contained in:
parent
d85ebeb7f0
commit
b02c901180
|
|
@ -165,6 +165,7 @@ public class SettingDictDataServiceImpl implements ISettingDictDataService {
|
||||||
Assert.isNull(dictDataMapper.selectOne(new QueryWrapper<DictData>()
|
Assert.isNull(dictDataMapper.selectOne(new QueryWrapper<DictData>()
|
||||||
.select("id")
|
.select("id")
|
||||||
.eq("name", createValidate.getName())
|
.eq("name", createValidate.getName())
|
||||||
|
.eq("type_id", createValidate.getTypeId())
|
||||||
.isNull("delete_time")
|
.isNull("delete_time")
|
||||||
.last("limit 1")), "字典数据已存在!");
|
.last("limit 1")), "字典数据已存在!");
|
||||||
|
|
||||||
|
|
@ -200,6 +201,7 @@ public class SettingDictDataServiceImpl implements ISettingDictDataService {
|
||||||
.select("id")
|
.select("id")
|
||||||
.ne("id", updateValidate.getId())
|
.ne("id", updateValidate.getId())
|
||||||
.eq("name", updateValidate.getName())
|
.eq("name", updateValidate.getName())
|
||||||
|
.eq("type_id", updateValidate.getTypeId())
|
||||||
.isNull("delete_time")
|
.isNull("delete_time")
|
||||||
.last("limit 1")), "字典数据已存在!");
|
.last("limit 1")), "字典数据已存在!");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue