From 850260cc3c7f1f3ef94ed247fb14df92a1b86cdb Mon Sep 17 00:00:00 2001 From: liao Date: Mon, 18 Sep 2023 15:17:38 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=B3=95=E8=A7=84=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/service/impl/LawsCommonServiceImpl.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java index 8c1ea4d8..aafe7f11 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java @@ -163,12 +163,11 @@ public class LawsCommonServiceImpl implements ILawsCommonService { if (!Objects.isNull(entryMap.getValue())) { value = (String) entryMap.getValue(); } + resultMap.put(key, value); // 如果value不为null和"",对返回结果做处理 if (StringUtils.isNotBlank(value)) { // 对返回的字段值做处理 processResultFieldValue(key, value, fieldList, resultMap, dictItemList); - } else { - resultMap.put(key, value); } } return resultMap; @@ -200,12 +199,11 @@ public class LawsCommonServiceImpl implements ILawsCommonService { if (!Objects.isNull(entryMap.getValue())) { value = (String) entryMap.getValue(); } + resultMap.put(key, value); // 如果value不为null和"",对返回结果做处理 if (StringUtils.isNotBlank(value)) { // 对返回的字段值做处理 processResultFieldValue(key, value, fieldList, resultMap, dictItemList); - } else { - resultMap.put(key, value); } } resultMapList.add(resultMap); @@ -220,10 +218,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService { **/ private void processResultFieldValue(String key, String value, List fieldList, Map resultMap, List dictItemList) { - if ("id".equals(key)) { - resultMap.put(key, value); - return; - } for (LawsTag lawsTag : fieldList) { if (key.equals(lawsTag.getDbFieldName())) { List valueList = Arrays.asList(value.split(",")); @@ -260,8 +254,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService { && valueList.contains(dictItem.getItemValue())) .map(SysDictItem::getItemText).collect(Collectors.toList()); resultMap.put(key + FieldCommon._DICT_TEXT, StringUtils.join(nameList, ",")); - } else { - resultMap.put(key, value); } } }