fix 逻辑删除

This commit is contained in:
yulichang 2022-11-27 19:43:37 +08:00
parent 89a6dfd4aa
commit 7d861ebbcb
3 changed files with 5 additions and 5 deletions

View File

@ -15,12 +15,12 @@ QQ群:1022221898
<dependency> <dependency>
<groupId>com.github.yulichang</groupId> <groupId>com.github.yulichang</groupId>
<artifactId>mybatis-plus-join-boot-starter</artifactId> <artifactId>mybatis-plus-join-boot-starter</artifactId>
<version>2.0.0</version> <version>1.3.8</version>
</dependency> </dependency>
``` ```
- Gradle - 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, 再引入以上依赖 或者clone代码到本地执行 mvn install, 再引入以上依赖
<br> <br>

View File

@ -11,7 +11,7 @@
</parent> </parent>
<version>1.3.8</version> <version>1.3.8</version>
<artifactId>mybatis-plus-join-boot-starter</artifactId> <artifactId>mybatis-plus-join-boot-starter</artifactId>
<name>mybatis-plus-join-boot</name> <name>mybatis-plus-join-boot-starter</name>
<description>An enhanced toolkit of Mybatis-Plus to simplify development.</description> <description>An enhanced toolkit of Mybatis-Plus to simplify development.</description>
<url>https://github.com/yulichang/mybatis-plus-join</url> <url>https://github.com/yulichang/mybatis-plus-join</url>

View File

@ -42,9 +42,9 @@ public interface MPJBaseMethod extends Constants {
sqlScript = SqlScriptUtils.convertIf(sqlScript, String.format("%s != null", WRAPPER_ENTITY), true); sqlScript = SqlScriptUtils.convertIf(sqlScript, String.format("%s != null", WRAPPER_ENTITY), true);
sqlScript += NEWLINE; sqlScript += NEWLINE;
if (ConfigProperties.subTableLogic) { 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.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(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); sqlScript = SqlScriptUtils.convertIf(sqlScript, String.format("%s != null", WRAPPER), true);