From 5de4ebfd2b053514e1c1f360e7e46abdd49ddfdd Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Tue, 16 Apr 2019 10:14:53 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=AD=97=E5=85=B8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=8D=95=E4=B8=AAValue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/iocoder/mall/admin/api/DataDictService.java | 2 +- .../main/java/cn/iocoder/mall/admin/api/bo/DataDictBO.java | 3 ++- .../cn/iocoder/mall/admin/service/DataDictServiceImpl.java | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) 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 04390ca82..c0a47974f 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,5 +17,5 @@ public interface DataDictService { CommonResult deleteDataDict(Integer adminId, Integer dataDictId); - CommonResult getDataDict(String dictKey, String dictValue); + CommonResult getDataDict(String dictKey, Object dictValue); } diff --git a/admin/admin-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/DataDictBO.java b/admin/admin-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/DataDictBO.java index 7ca34c7cc..479388802 100644 --- a/admin/admin-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/DataDictBO.java +++ b/admin/admin-service-api/src/main/java/cn/iocoder/mall/admin/api/bo/DataDictBO.java @@ -3,6 +3,7 @@ package cn.iocoder.mall.admin.api.bo; import lombok.Data; import lombok.experimental.Accessors; +import java.io.Serializable; import java.util.Date; /** @@ -10,7 +11,7 @@ import java.util.Date; */ @Data @Accessors(chain = true) -public class DataDictBO { +public class DataDictBO implements Serializable { /** * 编号 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 1acc72f61..663d7fc75 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 @@ -88,8 +88,8 @@ public class DataDictServiceImpl implements DataDictService { } @Override - public CommonResult getDataDict(String dictKey, String dictValue) { - DataDictDO dataDictDO = dataDictMapper.selectByEnumValueAndValue(dictKey, dictValue); + public CommonResult getDataDict(String dictKey, Object dictValue) { + DataDictDO dataDictDO = dataDictMapper.selectByEnumValueAndValue(dictKey, String.valueOf(dictValue)); DataDictBO dataDictBO = DataDictConvert.INSTANCE.convert(dataDictDO); return CommonResult.success(dataDictBO); }