作者 RuoYi

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

@@ -144,9 +144,9 @@ public class GenTableServiceImpl implements IGenTableService @@ -144,9 +144,9 @@ 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) 147 + try
148 { 148 {
149 - try 149 + for (GenTable table : tableList)
150 { 150 {
151 String tableName = table.getTableName(); 151 String tableName = table.getTableName();
152 GenUtils.initTable(table, operName); 152 GenUtils.initTable(table, operName);
@@ -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 - 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