update 优化代码生成 同步操作使用批量处理
This commit is contained in:
parent
b13c10ccd6
commit
ab7f6957b9
@ -317,13 +317,11 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||
column.setIsRequired(prevColumn.getIsRequired());
|
||||
column.setHtmlType(prevColumn.getHtmlType());
|
||||
}
|
||||
genTableColumnMapper.updateById(column);
|
||||
} else {
|
||||
genTableColumnMapper.insert(column);
|
||||
}
|
||||
saveColumns.add(column);
|
||||
});
|
||||
if (CollUtil.isNotEmpty(saveColumns)) {
|
||||
genTableColumnMapper.insertBatch(saveColumns);
|
||||
genTableColumnMapper.insertOrUpdateBatch(saveColumns);
|
||||
}
|
||||
List<GenTableColumn> delColumns = StreamUtils.filter(tableColumns, column -> !dbTableColumnNames.contains(column.getColumnName()));
|
||||
if (CollUtil.isNotEmpty(delColumns)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user