From b8c3b1caf6e91a46b13806e01c99fee6337f79a8 Mon Sep 17 00:00:00 2001 From: yueke <70803242+luckey-ke@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:13:50 +0800 Subject: [PATCH] =?UTF-8?q?select=E4=B8=BA=20false=20=E4=B8=8D=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=20select=20=E6=9F=A5=E8=AF=A2=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit select为 false 不加入 select 查询范围,结果忽略select 标识的字段 --- .../java/com/github/yulichang/toolkit/support/ColumnCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/support/ColumnCache.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/support/ColumnCache.java index e4e09ea..375305d 100644 --- a/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/support/ColumnCache.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/support/ColumnCache.java @@ -33,7 +33,7 @@ public class ColumnCache { if (ConfigProperties.tableInfoAdapter.mpjHasPK(tableInfo)) { list.add(new SelectCache(clazz, true, tableInfo.getKeyColumn(), tableInfo.getKeyType(), tableInfo.getKeyProperty(), null)); } - list.addAll(tableInfo.getFieldList().stream().map(f -> new SelectCache(clazz, false, f.getColumn(), f.getPropertyType(), f.getProperty(), f)).collect(Collectors.toList())); + list.addAll(tableInfo.getFieldList().stream().filter(TableFieldInfo::isSelect).map(f -> new SelectCache(clazz, false, f.getColumn(), f.getPropertyType(), f.getProperty(), f)).collect(Collectors.toList())); return list; }); }