Commit 09a13fa7 authored by mcb's avatar mcb

COMMIT

parent a500b268
......@@ -449,8 +449,8 @@ public class ParameterUtils {
}
}
//设置values语句
valuesSqlSb.append("?");
valuesSqlSb.append(",");
valuesSqlSb.append("?");
if ("0".equals(isPrimaryKey) && myDbType.MySQL == myDbType) {
//设置update语句
updateSqlSb.append(targetFieldName);
......@@ -472,7 +472,6 @@ public class ParameterUtils {
}
}
}
String primaryKeySqlStr = "";
if (org.apache.commons.lang3.StringUtils.isNotEmpty(primaryKeySqlSb)) {
primaryKeySqlStr = primaryKeySqlSb.substring(0, primaryKeySqlSb.length() - 1);
......@@ -487,7 +486,7 @@ public class ParameterUtils {
sb.append(" INSERT INTO ");
sb.append(tableName + " ");
sb.append(" VALUES( ");
sb.append(valuesSqlSb);
sb.append(valuesSqlSb.substring(1));
sb.append(" ) ");
sb.append(" ON DUPLICATE KEY UPDATE ");
......@@ -496,7 +495,7 @@ public class ParameterUtils {
sb.append(" INSERT INTO ");
sb.append(tableName + " ");
sb.append(" VALUES( ");
sb.append(valuesSqlSb);
sb.append(valuesSqlSb.substring(1));
sb.append(") ");
sb.append(" ON CONFLICT( ");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment