miemie 4 years ago
parent
commit
93a5f43261

+ 6 - 6
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/AbstractWrapper.java

@@ -223,8 +223,8 @@ public abstract class AbstractWrapper<T, R, Children extends AbstractWrapper<T,
     }
 
     @Override
-    public Children apply(boolean condition, String applySql, Object... value) {
-        return doIt(condition, APPLY, () -> formatSql(applySql, value));
+    public Children apply(boolean condition, String applySql, Object... values) {
+        return doIt(condition, APPLY, () -> formatSql(applySql, values));
     }
 
     @Override
@@ -252,13 +252,13 @@ public abstract class AbstractWrapper<T, R, Children extends AbstractWrapper<T,
     }
 
     @Override
-    public Children exists(boolean condition, String existsSql, Object... value) {
-        return doIt(condition, EXISTS, () -> String.format("(%s)", formatSql(existsSql, value)));
+    public Children exists(boolean condition, String existsSql, Object... values) {
+        return doIt(condition, EXISTS, () -> String.format("(%s)", formatSql(existsSql, values)));
     }
 
     @Override
-    public Children notExists(boolean condition, String existsSql, Object... value) {
-        return not(condition).exists(condition, existsSql, value);
+    public Children notExists(boolean condition, String existsSql, Object... values) {
+        return not(condition).exists(condition, existsSql, values);
     }
 
     @Override

+ 12 - 11
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/interfaces/Join.java

@@ -44,8 +44,8 @@ public interface Join<Children> extends Serializable {
     /**
      * ignore
      */
-    default Children apply(String applySql, Object... value) {
-        return apply(true, applySql, value);
+    default Children apply(String applySql, Object... values) {
+        return apply(true, applySql, values);
     }
 
     /**
@@ -56,9 +56,10 @@ public interface Join<Children> extends Serializable {
      * <p>例3: apply("date_format(dateColumn,'%Y-%m-%d') = {0}", LocalDate.now())</p>
      *
      * @param condition 执行条件
+     * @param values    数据数组
      * @return children
      */
-    Children apply(boolean condition, String applySql, Object... value);
+    Children apply(boolean condition, String applySql, Object... values);
 
     /**
      * ignore
@@ -114,8 +115,8 @@ public interface Join<Children> extends Serializable {
     /**
      * ignore
      */
-    default Children exists(String existsSql, Object... value) {
-        return exists(true, existsSql, value);
+    default Children exists(String existsSql, Object... values) {
+        return exists(true, existsSql, values);
     }
 
     /**
@@ -125,16 +126,16 @@ public interface Join<Children> extends Serializable {
      *
      * @param condition 执行条件
      * @param existsSql sql语句
-     * @param value 同apply
+     * @param values    数据数组
      * @return children
      */
-    Children exists(boolean condition, String existsSql, Object... value);
+    Children exists(boolean condition, String existsSql, Object... values);
 
     /**
      * ignore
      */
-    default Children notExists(String existsSql, Object... value) {
-        return notExists(true, existsSql, value);
+    default Children notExists(String existsSql, Object... values) {
+        return notExists(true, existsSql, values);
     }
 
     /**
@@ -144,8 +145,8 @@ public interface Join<Children> extends Serializable {
      *
      * @param condition 执行条件
      * @param existsSql sql语句
-     * @param value 同apply
+     * @param values    数据数组
      * @return children
      */
-    Children notExists(boolean condition, String existsSql, Object... value);
+    Children notExists(boolean condition, String existsSql, Object... values);
 }

+ 6 - 6
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/conditions/AbstractChainWrapper.java

@@ -220,8 +220,8 @@ public abstract class AbstractChainWrapper<T, R, Children extends AbstractChainW
     }
 
     @Override
-    public Children apply(boolean condition, String applySql, Object... value) {
-        getWrapper().apply(condition, applySql, value);
+    public Children apply(boolean condition, String applySql, Object... values) {
+        getWrapper().apply(condition, applySql, values);
         return typedThis;
     }
 
@@ -244,14 +244,14 @@ public abstract class AbstractChainWrapper<T, R, Children extends AbstractChainW
     }
 
     @Override
-    public Children exists(boolean condition, String existsSql, Object... value) {
-        getWrapper().exists(condition, existsSql);
+    public Children exists(boolean condition, String existsSql, Object... values) {
+        getWrapper().exists(condition, existsSql, values);
         return typedThis;
     }
 
     @Override
-    public Children notExists(boolean condition, String existsSql, Object... value) {
-        getWrapper().notExists(condition, existsSql);
+    public Children notExists(boolean condition, String existsSql, Object... values) {
+        getWrapper().notExists(condition, existsSql, values);
         return typedThis;
     }