feat: updateByQuery add dynamic table support

This commit is contained in:
开源海哥 2023-07-30 10:31:57 +08:00
parent 621f151aa5
commit 1ef8729cb6

View File

@ -782,8 +782,12 @@ public class CommonsDialectImpl implements IDialect {
Set<String> updateColumns = tableInfo.obtainUpdateColumns(entity, ignoreNulls, true); Set<String> updateColumns = tableInfo.obtainUpdateColumns(entity, ignoreNulls, true);
Map<String, RawValue> rawValueMap = tableInfo.obtainUpdateRawValueMap(entity); Map<String, RawValue> rawValueMap = tableInfo.obtainUpdateRawValueMap(entity);
sql.append(UPDATE).append(forHint(CPI.getHint(queryWrapper))) sql.append(UPDATE).append(forHint(CPI.getHint(queryWrapper)));
.append(tableInfo.getWrapSchemaAndTableName(this)).append(SET); if (StringUtil.isNotBlank(tableInfo.getSchema())) {
sql.append(wrap(getRealSchema(tableInfo.getSchema()))).append(REFERENCE);
}
sql.append(wrap(getRealTable(tableInfo.getTableName()))).append(SET);
StringJoiner stringJoiner = new StringJoiner(DELIMITER); StringJoiner stringJoiner = new StringJoiner(DELIMITER);