From 2b05832304674740f1524379285296a41d3ec5a7 Mon Sep 17 00:00:00 2001 From: yulichang <570810310@qq.com> Date: Mon, 21 Nov 2022 19:30:36 +0800 Subject: [PATCH] id --- .../java/com/github/yulichang/interceptor/MPJInterceptor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java index 95965ec..9aabb62 100644 --- a/mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java @@ -200,7 +200,8 @@ public class MPJInterceptor implements Interceptor { } else { // 主键列 resultMappings.add(new ResultMapping.Builder(ms.getConfiguration(), i.getTagProperty(), - StringUtils.getTargetColumn(i.getColumnName()), i.getKeyType()).build()); + StringUtils.getTargetColumn(i.getColumnName()), i.getKeyType()) + .flags(Collections.singletonList(ResultFlag.ID)).build()); } } Set columnSet = resultMappings.stream().map(ResultMapping::getColumn).collect(Collectors.toSet());