获取字典详情返回字典类型名称

pull/57/head
Liyanjun 2023-07-04 11:15:24 +08:00
parent afb038af63
commit 0bab416b2b
1 changed files with 7 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import cn.stylefeng.roses.kernel.dict.api.exception.enums.DictExceptionEnum;
import cn.stylefeng.roses.kernel.dict.api.pojo.DictDetail;
import cn.stylefeng.roses.kernel.dict.api.pojo.SimpleDictUpdateParam;
import cn.stylefeng.roses.kernel.dict.modular.entity.SysDict;
import cn.stylefeng.roses.kernel.dict.modular.entity.SysDictType;
import cn.stylefeng.roses.kernel.dict.modular.factory.DictFactory;
import cn.stylefeng.roses.kernel.dict.modular.mapper.DictMapper;
import cn.stylefeng.roses.kernel.dict.modular.pojo.TreeDictInfo;
@ -149,7 +150,12 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, SysDict> implements
@Override
public SysDict detail(DictRequest dictRequest) {
return this.querySysDict(dictRequest);
SysDict sysDict= this.querySysDict(dictRequest);
if(ObjectUtil.isNotEmpty(sysDict.getDictTypeId())) {
SysDictType sysDictType=dictTypeService.getById(sysDict.getDictTypeId());
sysDict.setDictTypeName(sysDictType.getDictTypeName());
}
return sysDict;
}
@Override