fix: 修复查询代码生成数据库表未按时间排序的问题
This commit is contained in:
parent
86ee1f6c47
commit
f8e5e55fbf
@ -20,6 +20,7 @@ import java.io.File;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
@ -89,6 +90,8 @@ public class GeneratorServiceImpl implements GeneratorService {
|
||||
tableList.removeIf(table -> !StrUtil.containsAny(table.getTableName(), tableName));
|
||||
}
|
||||
tableList.removeIf(table -> StrUtil.equalsAny(table.getTableName(), generatorProperties.getExcludeTables()));
|
||||
CollUtil.sort(tableList,
|
||||
Comparator.comparing(Table::getCreateTime).thenComparing(Table::getUpdateTime).reversed());
|
||||
List<TableVO> tableVOList = BeanUtil.copyToList(tableList, TableVO.class);
|
||||
PageDataVO<TableVO> pageDataVO = PageDataVO.build(pageQuery.getPage(), pageQuery.getSize(), tableVOList);
|
||||
for (TableVO tableVO : pageDataVO.getList()) {
|
||||
|
@ -317,7 +317,6 @@
|
||||
tableName: undefined,
|
||||
page: 1,
|
||||
size: 10,
|
||||
sort: ['createTime,desc', 'updateTime,desc'],
|
||||
},
|
||||
// 表单数据
|
||||
form: {} as GenConfigRecord,
|
||||
|
Loading…
Reference in New Issue
Block a user