Skip to content

Commit

Permalink
to #57132470 fix append pk values which need quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
F-ca7 committed Jun 18, 2024
1 parent c8dcccd commit 1d02b48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions batch-tool/src/main/java/worker/util/DeleteUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ public static void appendPkValuesByFieldMetaInfo(StringBuilder localBuffer, List
int i;
for (i = 0; i < pkList.size(); i++) {
int idx = pkList.get(i).getOrdinalPosition() - 1;
if (fieldMetaInfoList.get(idx).getType() == FieldMetaInfo.Type.STRING ||
fieldMetaInfoList.get(idx).getType() == FieldMetaInfo.Type.OTHER) {
if (fieldMetaInfoList.get(idx).needQuote()) {
// 字符串和日期都需要单引号
localBuffer.append("'")
.append(StringEscapeUtils.escapeSql(pkValues[i]))
Expand Down

0 comments on commit 1d02b48

Please sign in to comment.