增加一个 dict 获取的 值

This commit is contained in:
sin 2019-04-14 17:43:57 +08:00
parent 38b2613add
commit 204452c9d0
2 changed files with 7 additions and 0 deletions

View File

@ -17,4 +17,5 @@ public interface DataDictService {
CommonResult<Boolean> deleteDataDict(Integer adminId, Integer dataDictId); CommonResult<Boolean> deleteDataDict(Integer adminId, Integer dataDictId);
CommonResult<DataDictBO> getDataDict(String dictKey, String dictValue);
} }

View File

@ -87,4 +87,10 @@ public class DataDictServiceImpl implements DataDictService {
return CommonResult.success(true); return CommonResult.success(true);
} }
@Override
public CommonResult<DataDictBO> getDataDict(String dictKey, String dictValue) {
DataDictDO dataDictDO = dataDictMapper.selectByEnumValueAndValue(dictKey, dictValue);
DataDictBO dataDictBO = DataDictConvert.INSTANCE.convert(dataDictDO);
return CommonResult.success(dataDictBO);
}
} }