From 6e75e88d710b2ef8cd7404ca31a79960cfdca890 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 27 七月 2021 12:48:28 +0800
Subject: [PATCH] update 同步ruoyi修正

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
index 7b5d061..eee0595 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
@@ -20,6 +20,7 @@
 import org.springframework.stereotype.Service;
 
 import javax.annotation.PostConstruct;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -93,6 +94,20 @@
 	}
 
 	/**
+	 * 鑾峰彇楠岃瘉鐮佸紑鍏�
+	 *
+	 * @return true寮�鍚紝false鍏抽棴
+	 */
+	@Override
+	public boolean selectCaptchaOnOff() {
+		String captchaOnOff = selectConfigByKey("sys.account.captchaOnOff");
+		if (StrUtil.isEmpty(captchaOnOff)) {
+			return true;
+		}
+		return Convert.toBool(captchaOnOff);
+	}
+
+	/**
 	 * 鏌ヨ鍙傛暟閰嶇疆鍒楄〃
 	 *
 	 * @param config 鍙傛暟閰嶇疆淇℃伅
@@ -157,9 +172,9 @@
 			if (StrUtil.equals(UserConstants.YES, config.getConfigType())) {
 				throw new CustomException(String.format("鍐呯疆鍙傛暟銆�%1$s銆戜笉鑳藉垹闄� ", config.getConfigKey()));
 			}
-			baseMapper.deleteById(configId);
 			redisCache.deleteObject(getCacheKey(config.getConfigKey()));
 		}
+		baseMapper.deleteBatchIds(Arrays.asList(configIds));
 	}
 
 	/**

--
Gitblit v1.9.3