mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	update 优化代码生成 同步操作使用批量处理
This commit is contained in:
		@@ -313,13 +313,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)) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user