diff --git a/src/main/java/com/glxp/api/config/ReplaceBatch.java b/src/main/java/com/glxp/api/config/ReplaceBatch.java index 61b95f6f..52babeb5 100644 --- a/src/main/java/com/glxp/api/config/ReplaceBatch.java +++ b/src/main/java/com/glxp/api/config/ReplaceBatch.java @@ -41,9 +41,12 @@ public class ReplaceBatch extends AbstractMethod { KeyGenerator keyGenerator = new NoKeyGenerator(); CustomerSqlMethod sqlMethod = CustomerSqlMethod.REPLACE_ONE; List fieldList = tableInfo.getFieldList(); - String insertSqlColumn = tableInfo.getKeyInsertSqlColumn(true, true) + - this.filterTableFieldInfo(fieldList, predicate, TableFieldInfo::getInsertSqlColumn, EMPTY); - String columnScript = LEFT_BRACKET + insertSqlColumn.substring(0, insertSqlColumn.length() - 1) + RIGHT_BRACKET; + + String columnScript = SqlScriptUtils.convertTrim(tableInfo.getAllInsertSqlColumnMaybeIf(null), + LEFT_BRACKET, RIGHT_BRACKET, null, COMMA); +// String insertSqlColumn = tableInfo.getKeyInsertSqlColumn(true, true) + +// this.filterTableFieldInfo(fieldList, predicate, TableFieldInfo::getInsertSqlColumn, EMPTY); +// String columnScript = LEFT_BRACKET + insertSqlColumn.substring(0, insertSqlColumn.length() - 1) + RIGHT_BRACKET; String insertSqlProperty = tableInfo.getKeyInsertSqlProperty(true, ENTITY_DOT, true) + this.filterTableFieldInfo(fieldList, predicate, i -> i.getInsertSqlProperty(ENTITY_DOT), EMPTY); insertSqlProperty = LEFT_BRACKET + insertSqlProperty.substring(0, insertSqlProperty.length() - 1) + RIGHT_BRACKET;