From b8552ef01e819e71e9c609b2d22f7e40a3f10e5b Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Wed, 17 Apr 2024 17:17:59 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E7=9F=A9=E9=98=B5?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E6=8E=A5=E5=8F=A3=E6=94=AF=E6=8C=81matrixLab?= =?UTF-8?q?el=E6=9B=BF=E4=BB=A3matrixUuid=EF=BC=8CattrName=E6=9B=BF?= =?UTF-8?q?=E4=BB=A3attrUuid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1136926608818176]矩阵两个接口支持matrixLabel替代matrixUuid,attrName替代attrUuid http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1136926608818176 --- .../api/matrix/MatrixColumnDataSearchForSelectApi.java | 10 +++++++++- .../matrix/MatrixColumnDataSearchForTableNewApi.java | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixColumnDataSearchForSelectApi.java b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixColumnDataSearchForSelectApi.java index 5e9359af..4aafc063 100644 --- a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixColumnDataSearchForSelectApi.java +++ b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixColumnDataSearchForSelectApi.java @@ -164,7 +164,15 @@ public class MatrixColumnDataSearchForSelectApi extends PrivateApiComponentBase if (CollectionUtils.isEmpty(matrixAttributeList)) { return new JSONObject(); } - Map nameToUuidMap = matrixAttributeList.stream().collect(Collectors.toMap(MatrixAttributeVo::getName, MatrixAttributeVo::getUuid)); + Map nameToUuidMap = new HashMap<>(); + for (MatrixAttributeVo matrixAttributeVo : matrixAttributeList) { + String name = matrixAttributeVo.getName(); + if(nameToUuidMap.containsKey(name)) { + nameToUuidMap.remove(name); + } else { + nameToUuidMap.put(name, matrixAttributeVo.getUuid()); + } + } List filterList = dataVo.getFilterList(); if (CollectionUtils.isNotEmpty(filterList)) { Iterator iterator = filterList.iterator(); diff --git a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixColumnDataSearchForTableNewApi.java b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixColumnDataSearchForTableNewApi.java index 20a8ca92..47b233e3 100644 --- a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixColumnDataSearchForTableNewApi.java +++ b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixColumnDataSearchForTableNewApi.java @@ -157,7 +157,15 @@ public class MatrixColumnDataSearchForTableNewApi extends PrivateApiComponentBas if (CollectionUtils.isEmpty(matrixAttributeList)) { return new JSONObject(); } - Map nameToUuidMap = matrixAttributeList.stream().collect(Collectors.toMap(MatrixAttributeVo::getName, MatrixAttributeVo::getUuid)); + Map nameToUuidMap = new HashMap<>(); + for (MatrixAttributeVo matrixAttributeVo : matrixAttributeList) { + String name = matrixAttributeVo.getName(); + if(nameToUuidMap.containsKey(name)) { + nameToUuidMap.remove(name); + } else { + nameToUuidMap.put(name, matrixAttributeVo.getUuid()); + } + } List filterList = dataVo.getFilterList(); if (CollectionUtils.isNotEmpty(filterList)) { Iterator iterator = filterList.iterator(); -- Gitee