From 38ac1d5c1b7f85f5a07d745d0d189a83508e1536 Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 23 May 2024 17:17:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E7=BB=84=E4=BB=B6=E6=8E=92=E5=BA=8F=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/dataset/manage/DatasetDataManage.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java index 98e2410322..97ed061b71 100644 --- a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java +++ b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java @@ -532,6 +532,13 @@ public class DatasetDataManage { boolean crossDs = false; Map dsMap = null; + if (ObjectUtils.isNotEmpty(request.getSortId())) { + // 如果排序字段和查询字段显示字段不一致,则加入到查询列表中 + if (!request.getSortId().equals(request.getQueryId()) && !request.getSortId().equals(request.getDisplayId())) { + ids.add(request.getSortId()); + } + } + for (Long id : ids) { DatasetTableFieldDTO field = datasetTableFieldManage.selectById(id); if (field == null) {