From aad58640dcaab7bed4f9720b57bb7f0cc2c4e343 Mon Sep 17 00:00:00 2001
From: Sxile <3440626@qq.com>
Date: Fri, 17 Jul 2020 11:10:14 +0800
Subject: [PATCH] 翻转""为equals调用方,防止空指针异常
---
ruoyi/src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java
index bd551ad..b10c549 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java
@@ -144,9 +144,9 @@
public void importGenTable(List<GenTable> tableList)
{
String operName = SecurityUtils.getUsername();
- for (GenTable table : tableList)
+ try
{
- try
+ for (GenTable table : tableList)
{
String tableName = table.getTableName();
GenUtils.initTable(table, operName);
@@ -162,10 +162,10 @@
}
}
}
- catch (Exception e)
- {
- log.error("表名 " + table.getTableName() + " 导入失败:", e);
- }
+ }
+ catch (Exception e)
+ {
+ throw new CustomException("导入失败:" + e.getMessage());
}
}
--
Gitblit v1.9.2