update 优化 代码增加空判断与其他性能优化

This commit is contained in:
疯狂的狮子Li
2026-03-10 17:20:37 +08:00
parent aaede419bc
commit 2d7195c61d
12 changed files with 100 additions and 19 deletions

View File

@@ -523,6 +523,9 @@ public class GenTableServiceImpl implements IGenTableService {
* @param table 业务表信息
*/
public void setPkColumn(GenTable table) {
if (CollUtil.isEmpty(table.getColumns())) {
throw new ServiceException("表【" + table.getTableName() + "】字段为空,请检查表结构");
}
for (GenTableColumn column : table.getColumns()) {
if (column.isPk()) {
table.setPkColumn(column);