From 17936814b024b56da66966d6459957274ce66d8a Mon Sep 17 00:00:00 2001 From: yulichang <570810310@qq.com> Date: Wed, 31 Jul 2024 21:18:54 +0800 Subject: [PATCH] fix https://github.com/yulichang/mybatis-plus-join/issues/160 --- .../com/github/yulichang/wrapper/JoinAbstractLambdaWrapper.java | 2 +- .../java/com/github/yulichang/wrapper/JoinAbstractWrapper.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/JoinAbstractLambdaWrapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/JoinAbstractLambdaWrapper.java index 3118885..d4e3380 100644 --- a/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/JoinAbstractLambdaWrapper.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/JoinAbstractLambdaWrapper.java @@ -219,7 +219,7 @@ public abstract class JoinAbstractLambdaWrapper String columnsToString(Integer index, PrefixEnum prefixEnum, String alias, SFunction... columns) { - return Arrays.stream(columns).map(i -> columnToString(index, alias, i, false, prefixEnum, false)) + return Arrays.stream(columns).map(i -> columnToString(index, alias, i, false, prefixEnum, true)) .collect(joining(StringPool.COMMA)); } diff --git a/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/JoinAbstractWrapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/JoinAbstractWrapper.java index 43c4aeb..621ba46 100644 --- a/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/JoinAbstractWrapper.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/JoinAbstractWrapper.java @@ -493,7 +493,7 @@ public abstract class JoinAbstractWrapper Children groupBy(boolean condition, String alias, SFunction column, SFunction... columns) { return maybeDo(condition, () -> { - String one = columnToString(index, alias, column, false, isOn ? PrefixEnum.ON_FIRST : PrefixEnum.CD_FIRST, false); + String one = columnToString(index, alias, column, false, isOn ? PrefixEnum.ON_FIRST : PrefixEnum.CD_FIRST, true); if (ArrayUtils.isNotEmpty(columns)) { one += (StringPool.COMMA + columnsToString(index, isOn ? PrefixEnum.ON_FIRST : PrefixEnum.CD_FIRST, alias, columns)); }