diff --git a/admin/admin-service-api/src/main/java/cn/iocoder/mall/admin/api/DataDictService.java b/admin/admin-service-api/src/main/java/cn/iocoder/mall/admin/api/DataDictService.java index c6dbaecc3..04390ca82 100644 --- a/admin/admin-service-api/src/main/java/cn/iocoder/mall/admin/api/DataDictService.java +++ b/admin/admin-service-api/src/main/java/cn/iocoder/mall/admin/api/DataDictService.java @@ -17,4 +17,5 @@ public interface DataDictService { CommonResult deleteDataDict(Integer adminId, Integer dataDictId); + CommonResult getDataDict(String dictKey, String dictValue); } diff --git a/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java b/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java index 3ba01abc4..1acc72f61 100644 --- a/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java +++ b/admin/admin-service-impl/src/main/java/cn/iocoder/mall/admin/service/DataDictServiceImpl.java @@ -87,4 +87,10 @@ public class DataDictServiceImpl implements DataDictService { return CommonResult.success(true); } + @Override + public CommonResult getDataDict(String dictKey, String dictValue) { + DataDictDO dataDictDO = dataDictMapper.selectByEnumValueAndValue(dictKey, dictValue); + DataDictBO dataDictBO = DataDictConvert.INSTANCE.convert(dataDictDO); + return CommonResult.success(dataDictBO); + } } \ No newline at end of file