Commit 794d6f17db3a5cee764d6521245ba45ce3d44b61

Authored by RuoYi
1 parent 7a9564ce

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

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