소스 검색

调整代码格式

miemie 6 년 전
부모
커밋
a1883471f9

+ 1 - 2
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/injector/methods/additional/InsertBatchAllColumn.java

@@ -57,8 +57,7 @@ public class InsertBatchAllColumn extends AbstractMethod {
         KeyGenerator keyGenerator = new NoKeyGenerator();
         SqlMethod sqlMethod = SqlMethod.INSERT_ONE;
         String insertSqlColumn = tableInfo.getAllInsertSqlColumn(true);
-        String columnScript = LEFT_BRACKET + insertSqlColumn.substring(0, insertSqlColumn.length() - 1)
-            + RIGHT_BRACKET;
+        String columnScript = LEFT_BRACKET + insertSqlColumn.substring(0, insertSqlColumn.length() - 1) + RIGHT_BRACKET;
         String insertSqlProperty = tableInfo.getAllInsertSqlProperty(true, ENTITY_DOT);
         insertSqlProperty = LEFT_BRACKET + insertSqlProperty.substring(0, insertSqlProperty.length() - 1) + RIGHT_BRACKET;
         String valuesScript = SqlScriptUtils.convertForeach(insertSqlProperty, "list", null, ENTITY, COMMA);

+ 4 - 6
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/injector/methods/additional/LogicDeleteByIdWithFill.java

@@ -58,12 +58,10 @@ public class LogicDeleteByIdWithFill extends AbstractLogicMethod {
                 .filter(i -> i.getFieldFill() == FieldFill.UPDATE || i.getFieldFill() == FieldFill.INSERT_UPDATE)
                 .collect(toList());
             if (CollectionUtils.isNotEmpty(fieldInfos)) {
-                String sqlSet = "SET " + fieldInfos.stream().map(i -> i.getSqlSet(EMPTY))
-                    .collect(joining(EMPTY)) +
-                    tableInfo.getLogicDeleteSql(false, true);
-                sql = String.format(sqlMethod.getSql(), tableInfo.getTableName(), sqlSet,
-                    tableInfo.getKeyColumn(), tableInfo.getKeyProperty(),
-                    tableInfo.getLogicDeleteSql(true, false));
+                String sqlSet = "SET " + fieldInfos.stream().map(i -> i.getSqlSet(EMPTY)).collect(joining(EMPTY))
+                    + tableInfo.getLogicDeleteSql(false, true);
+                sql = String.format(sqlMethod.getSql(), tableInfo.getTableName(), sqlSet, tableInfo.getKeyColumn(),
+                    tableInfo.getKeyProperty(), tableInfo.getLogicDeleteSql(true, false));
             } else {
                 sql = String.format(sqlMethod.getSql(), tableInfo.getTableName(), sqlLogicSet(tableInfo),
                     tableInfo.getKeyColumn(), tableInfo.getKeyProperty(),