diff --git a/README.md b/README.md
index f3c707f..20550b5 100644
--- a/README.md
+++ b/README.md
@@ -20,12 +20,11 @@
com.github.yulichang
mybatis-plus-join
- 1.1.1
+ 1.1.2
```
或者clone代码到本地,执行mvn install,再引入以上依赖
- 注:需要mybatis-plus版本号大于等于 3.4.0
2. 添加配置文件
diff --git a/pom.xml b/pom.xml
index e9c40fa..ca82329 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.github.yulichang
mybatis-plus-join
- 1.1.1
+ 1.1.2
mybatis-plus-join
An enhanced toolkit of Mybatis-Plus to simplify development.
https://github.com/yulichang/mybatis-plus-join
diff --git a/src/main/java/com/github/yulichang/method/MPJAbstractMethod.java b/src/main/java/com/github/yulichang/method/MPJAbstractMethod.java
index 72a8171..a9718ef 100644
--- a/src/main/java/com/github/yulichang/method/MPJAbstractMethod.java
+++ b/src/main/java/com/github/yulichang/method/MPJAbstractMethod.java
@@ -15,6 +15,23 @@ import java.util.List;
*/
public abstract class MPJAbstractMethod extends AbstractMethod {
+ /**
+ * 连表操作不考虑entity查询和逻辑删除
+ */
+ @Override
+ protected String sqlWhereEntityWrapper(boolean newLine, TableInfo table) {
+ String sqlScript = EMPTY;
+ sqlScript += SqlScriptUtils.convertIf(String.format(SqlScriptUtils.convertIf(" AND", String.format("%s and %s", WRAPPER_NONEMPTYOFENTITY, WRAPPER_NONEMPTYOFNORMAL), false) + " ${%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);
+ return newLine ? NEWLINE + sqlScript : sqlScript;
+ }
+
@Override
protected String sqlSelectColumns(TableInfo table, boolean queryWrapper) {
String selectColumns = ASTERISK;