From 7d861ebbcbddc716b8cd3f47cf6c27c4030ffd67 Mon Sep 17 00:00:00 2001
From: yulichang <570810310@qq.com>
Date: Sun, 27 Nov 2022 19:43:37 +0800
Subject: [PATCH] =?UTF-8?q?fix=20=E9=80=BB=E8=BE=91=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 4 ++--
mybatis-plus-join-boot-starter/pom.xml | 2 +-
.../main/java/com/github/yulichang/method/MPJBaseMethod.java | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 2931923..5c1c52a 100644
--- a/README.md
+++ b/README.md
@@ -15,12 +15,12 @@ QQ群:1022221898
com.github.yulichang
mybatis-plus-join-boot-starter
- 2.0.0
+ 1.3.8
```
- Gradle
```
- implementation 'com.github.yulichang:mybatis-plus-join-boot-starter:2.0.0'
+ implementation 'com.github.yulichang:mybatis-plus-join-boot-starter:1.3.8'
```
或者clone代码到本地执行 mvn install, 再引入以上依赖
diff --git a/mybatis-plus-join-boot-starter/pom.xml b/mybatis-plus-join-boot-starter/pom.xml
index 79b91c6..1c37bc0 100644
--- a/mybatis-plus-join-boot-starter/pom.xml
+++ b/mybatis-plus-join-boot-starter/pom.xml
@@ -11,7 +11,7 @@
1.3.8
mybatis-plus-join-boot-starter
- mybatis-plus-join-boot
+ mybatis-plus-join-boot-starter
An enhanced toolkit of Mybatis-Plus to simplify development.
https://github.com/yulichang/mybatis-plus-join
diff --git a/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/MPJBaseMethod.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/MPJBaseMethod.java
index d1bfbd4..60bcad0 100644
--- a/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/MPJBaseMethod.java
+++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/MPJBaseMethod.java
@@ -42,9 +42,9 @@ public interface MPJBaseMethod extends Constants {
sqlScript = SqlScriptUtils.convertIf(sqlScript, String.format("%s != null", WRAPPER_ENTITY), true);
sqlScript += NEWLINE;
if (ConfigProperties.subTableLogic) {
- sqlScript += String.format("${%s.logicSql}", WRAPPER);
+ sqlScript += (String.format("${%s.logicSql}", WRAPPER) + NEWLINE);
}
- sqlScript += SqlScriptUtils.convertIf(String.format("${%s}", WRAPPER_SQLSEGMENT), String.format("%s != null and %s != '' and %s", WRAPPER_SQLSEGMENT, WRAPPER_SQLSEGMENT, WRAPPER_NONEMPTYOFWHERE), true);
+ sqlScript += SqlScriptUtils.convertIf(String.format("AND ${%s}", WRAPPER_SQLSEGMENT), String.format("%s != null and %s != '' and %s", WRAPPER_SQLSEGMENT, WRAPPER_SQLSEGMENT, WRAPPER_NONEMPTYOFWHERE), true);
sqlScript = SqlScriptUtils.convertWhere(sqlScript) + NEWLINE;
sqlScript += SqlScriptUtils.convertIf(String.format(" ${%s}", WRAPPER_SQLSEGMENT), String.format("%s != null and %s != '' and %s", WRAPPER_SQLSEGMENT, WRAPPER_SQLSEGMENT, WRAPPER_EMPTYOFWHERE), true);
sqlScript = SqlScriptUtils.convertIf(sqlScript, String.format("%s != null", WRAPPER), true);