From 5b3901770843cab6ba0e434fdbe3e3302c9ff88e Mon Sep 17 00:00:00 2001
From: 心如止水 <8902735+gaobinbin991314@user.noreply.gitee.com>
Date: 星期四, 30 三月 2023 18:50:58 +0800
Subject: [PATCH] !324 系统配置读取方式变更 1、前端登录页面注册开关 对接后端数据库 2、密码最大错误次数与锁定时间转移到数据库 3、短信开关与验证码模板id 转移到数据库参数管理内

---
 ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java
index 03a3d64..3a4091c 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java
+++ b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java
@@ -11,7 +11,7 @@
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.core.constant.Constants;
-import com.ruoyi.common.core.constant.GenConstants;
+import com.ruoyi.generator.constant.GenConstants;
 import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.StreamUtils;
 import com.ruoyi.common.core.utils.StringUtils;
@@ -313,13 +313,11 @@
                     column.setIsRequired(prevColumn.getIsRequired());
                     column.setHtmlType(prevColumn.getHtmlType());
                 }
-                genTableColumnMapper.updateById(column);
-            } else {
-                genTableColumnMapper.insert(column);
             }
+            saveColumns.add(column);
         });
         if (CollUtil.isNotEmpty(saveColumns)) {
-            genTableColumnMapper.insertBatch(saveColumns);
+            genTableColumnMapper.insertOrUpdateBatch(saveColumns);
         }
         List<GenTableColumn> delColumns = StreamUtils.filter(tableColumns, column -> !dbTableColumnNames.contains(column.getColumnName()));
         if (CollUtil.isNotEmpty(delColumns)) {

--
Gitblit v1.9.3