diff --git a/healthlink-his-server/core-common/pom.xml b/healthlink-his-server/core-common/pom.xml index 792e8c3bb..be1167d9b 100755 --- a/healthlink-his-server/core-common/pom.xml +++ b/healthlink-his-server/core-common/pom.xml @@ -115,10 +115,6 @@ com.fasterxml.jackson.core jackson-databind - - tools.jackson.core - jackson-databind - diff --git a/healthlink-his-server/core-common/src/main/java/com/core/common/utils/DictUtils.java b/healthlink-his-server/core-common/src/main/java/com/core/common/utils/DictUtils.java index c33aa98e1..71f0fb838 100755 --- a/healthlink-his-server/core-common/src/main/java/com/core/common/utils/DictUtils.java +++ b/healthlink-his-server/core-common/src/main/java/com/core/common/utils/DictUtils.java @@ -43,6 +43,12 @@ public class DictUtils { if (StringUtils.isNull(cached)) { return null; } + // 如果已经是目标类型,直接返回 + if (cached instanceof List && ((List) cached).stream().allMatch(e -> e instanceof SysDictData)) { + @SuppressWarnings("unchecked") + List result = (List) cached; + return result; + } com.fasterxml.jackson.core.type.TypeReference> typeRef = new com.fasterxml.jackson.core.type.TypeReference>() {}; ObjectMapper mapper = new ObjectMapper()