fix: 删除字典下的字典项方法缺失问题修复
This commit is contained in:
@@ -187,7 +187,10 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
|||||||
boolean result = this.removeById(id);
|
boolean result = this.removeById(id);
|
||||||
if (result) {
|
if (result) {
|
||||||
// 删除字典下的字典项
|
// 删除字典下的字典项
|
||||||
dictItemService.removeByDictId(Convert.toLong(id));
|
dictItemService.remove(
|
||||||
|
new LambdaQueryWrapper<SysDictItem>()
|
||||||
|
.eq(SysDictItem::getDictId, id)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -201,7 +204,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
|||||||
public List<Option> listDictItemsByCode(String code) {
|
public List<Option> listDictItemsByCode(String code) {
|
||||||
// 根据字典编码获取字典ID
|
// 根据字典编码获取字典ID
|
||||||
SysDict dict = this.getOne(new LambdaQueryWrapper<SysDict>()
|
SysDict dict = this.getOne(new LambdaQueryWrapper<SysDict>()
|
||||||
.eq(SysDict::getCode, code)
|
.eq(SysDict::getCode, code)
|
||||||
.select(SysDict::getId)
|
.select(SysDict::getId)
|
||||||
.last("limit 1")
|
.last("limit 1")
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user