修复表结构同步功能

This commit is contained in:
TinyAnts 2022-08-12 11:40:32 +08:00
parent 2006cd7132
commit 1cf0e277e8
1 changed files with 3 additions and 1 deletions

View File

@ -290,9 +290,11 @@ public class GenerateServiceImpl implements IGenerateService {
GenTable genTable = genTableMapper.selectById(id);
List<GenTableColumn> genTableColumns = genTableColumnMapper.selectList(
new QueryWrapper<GenTableColumn>()
.eq("table_id", id)
.eq("table_id", id)
.orderByAsc("sort"));
Assert.isFalse(StringUtil.isEmpty(genTableColumns), "原表数据异常!");
// 原表转Map
Map<String, GenTableColumn> tableColumnMap = genTableColumns
.stream().collect(Collectors.toMap(GenTableColumn::getColumnName, Function.identity()));