作者 RuoYi

修复代码生成导入表结构出现异常页面不提醒问题

@@ -144,10 +144,10 @@ public class GenTableServiceImpl implements IGenTableService @@ -144,10 +144,10 @@ public class GenTableServiceImpl implements IGenTableService
144 public void importGenTable(List<GenTable> tableList) 144 public void importGenTable(List<GenTable> tableList)
145 { 145 {
146 String operName = SecurityUtils.getUsername(); 146 String operName = SecurityUtils.getUsername();
147 - for (GenTable table : tableList)  
148 - {  
149 try 147 try
150 { 148 {
  149 + for (GenTable table : tableList)
  150 + {
151 String tableName = table.getTableName(); 151 String tableName = table.getTableName();
152 GenUtils.initTable(table, operName); 152 GenUtils.initTable(table, operName);
153 int row = genTableMapper.insertGenTable(table); 153 int row = genTableMapper.insertGenTable(table);
@@ -162,10 +162,10 @@ public class GenTableServiceImpl implements IGenTableService @@ -162,10 +162,10 @@ public class GenTableServiceImpl implements IGenTableService
162 } 162 }
163 } 163 }
164 } 164 }
  165 + }
165 catch (Exception e) 166 catch (Exception e)
166 { 167 {
167 - log.error("表名 " + table.getTableName() + " 导入失败:", e);  
168 - } 168 + throw new CustomException("导入失败:" + e.getMessage());
169 } 169 }
170 } 170 }
171 171