miemie 6 éve
szülő
commit
2a812b8198

+ 1 - 5
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableFieldInfo.java

@@ -214,10 +214,6 @@ public class TableFieldInfo {
         return StringUtils.isNotEmpty(logicDeleteValue);
     }
 
-    public void setCondition(String condition) {
-        this.condition = condition;
-    }
-
     /**
      * 全局配置开启字段 LIKE 并且为字符串类型字段
      * 注入 LIKE 查询!!!
@@ -240,7 +236,7 @@ public class TableFieldInfo {
         if (sqlSelect != null) {
             return sqlSelect;
         }
-        if (isRelated()) {
+        if (related) {
             sqlSelect = SqlUtils.sqlWordConvert(dbType, getColumn(), true) + " AS " +
                 SqlUtils.sqlWordConvert(dbType, getProperty(), false);
         } else {

+ 3 - 3
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableInfo.java

@@ -156,15 +156,15 @@ public class TableInfo {
             return sqlSelect;
         }
         if (StringUtils.isNotEmpty(keyProperty)) {
-            if (isKeyRelated()) {
+            if (keyRelated) {
                 sqlSelect = SqlUtils.sqlWordConvert(dbType, keyColumn, true) + " AS " +
                     SqlUtils.sqlWordConvert(dbType, keyProperty, false);
             } else {
                 sqlSelect = SqlUtils.sqlWordConvert(dbType, keyColumn, true);
             }
-            return sqlSelect;
+        } else {
+            sqlSelect = "";
         }
-        sqlSelect = "";
         return sqlSelect;
     }