This commit is contained in:
ray
2024-11-09 00:31:21 +08:00
15 changed files with 67 additions and 57 deletions

View File

@@ -68,8 +68,9 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements Di
String dictCode = entity.getDictCode();
long count = this.count(new LambdaQueryWrapper<Dict>()
.eq(Dict::getDictCode, dictCode)
.eq(Dict::getDictCode, dictCode)
);
Assert.isTrue(count == 0, "字典编码已存在");
return this.save(entity);