chenchuang преди 3 години
родител
ревизия
eb71f2a1af
променени са 1 файла, в които са добавени 15 реда и са изтрити 15 реда
  1. 15 15
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java

+ 15 - 15
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java

@@ -71,20 +71,20 @@ public class LoginController {
 		//update-begin--Author:scott  Date:20190805 for:暂时注释掉密码加密逻辑,有点问题
 
 		//update-begin-author:taoyan date:20190828 for:校验验证码
-        String captcha = sysLoginModel.getCaptcha();
-        if(captcha==null){
-            result.error500("验证码无效");
-            return result;
-        }
-        String lowerCaseCaptcha = captcha.toLowerCase();
-		String realKey = MD5Util.MD5Encode(lowerCaseCaptcha+sysLoginModel.getCheckKey(), "utf-8");
-		Object checkCode = redisUtil.get(realKey);
-		//当进入登录页时,有一定几率出现验证码错误 #1714
-		if(checkCode==null || !checkCode.toString().equals(lowerCaseCaptcha)) {
-            log.warn("验证码错误,key= {} , Ui checkCode= {}, Redis checkCode = {}", sysLoginModel.getCheckKey(), lowerCaseCaptcha, checkCode);
-			result.error500("验证码错误");
-			return result;
-		}
+//        String captcha = sysLoginModel.getCaptcha();
+//        if(captcha==null){
+//            result.error500("验证码无效");
+//            return result;
+//        }
+//        String lowerCaseCaptcha = captcha.toLowerCase();
+//		String realKey = MD5Util.MD5Encode(lowerCaseCaptcha+sysLoginModel.getCheckKey(), "utf-8");
+//		Object checkCode = redisUtil.get(realKey);
+//		//当进入登录页时,有一定几率出现验证码错误 #1714
+//		if(checkCode==null || !checkCode.toString().equals(lowerCaseCaptcha)) {
+//            log.warn("验证码错误,key= {} , Ui checkCode= {}, Redis checkCode = {}", sysLoginModel.getCheckKey(), lowerCaseCaptcha, checkCode);
+//			result.error500("验证码错误");
+//			return result;
+//		}
 		//update-end-author:taoyan date:20190828 for:校验验证码
 		
 		//1. 校验用户是否有效
@@ -109,7 +109,7 @@ public class LoginController {
 		//用户登录信息
 		userInfo(sysUser, result);
 		//update-begin--Author:liusq  Date:20210126  for:登录成功,删除redis中的验证码
-		redisUtil.del(realKey);
+//		redisUtil.del(realKey);
 		//update-begin--Author:liusq  Date:20210126  for:登录成功,删除redis中的验证码
 		LoginUser loginUser = new LoginUser();
 		BeanUtils.copyProperties(sysUser, loginUser);