|  | @@ -4,6 +4,8 @@ import com.ruoyi.common.constant.Constants;
 | 
	
		
			
				|  |  |  import com.ruoyi.common.core.domain.model.LoginUser;
 | 
	
		
			
				|  |  |  import com.ruoyi.common.core.redis.RedisCache;
 | 
	
		
			
				|  |  |  import com.ruoyi.common.exception.CustomException;
 | 
	
		
			
				|  |  | +import com.ruoyi.common.exception.user.CaptchaException;
 | 
	
		
			
				|  |  | +import com.ruoyi.common.exception.user.CaptchaExpireException;
 | 
	
		
			
				|  |  |  import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
 | 
	
		
			
				|  |  |  import com.ruoyi.common.utils.MessageUtils;
 | 
	
		
			
				|  |  |  import com.ruoyi.framework.manager.AsyncManager;
 | 
	
	
		
			
				|  | @@ -46,14 +48,14 @@ public class SysLoginService {
 | 
	
		
			
				|  |  |          String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
 | 
	
		
			
				|  |  |          String captcha = redisCache.getCacheObject(verifyKey);
 | 
	
		
			
				|  |  |          redisCache.deleteObject(verifyKey);
 | 
	
		
			
				|  |  | -//        if (captcha == null) {
 | 
	
		
			
				|  |  | -//            AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
 | 
	
		
			
				|  |  | -//            throw new CaptchaExpireException();
 | 
	
		
			
				|  |  | -//        }
 | 
	
		
			
				|  |  | -//        if (!code.equalsIgnoreCase(captcha)) {
 | 
	
		
			
				|  |  | -//            AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
 | 
	
		
			
				|  |  | -//            throw new CaptchaException();
 | 
	
		
			
				|  |  | -//        }
 | 
	
		
			
				|  |  | +        if (captcha == null) {
 | 
	
		
			
				|  |  | +            AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
 | 
	
		
			
				|  |  | +            throw new CaptchaExpireException();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (!code.equalsIgnoreCase(captcha)) {
 | 
	
		
			
				|  |  | +            AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
 | 
	
		
			
				|  |  | +            throw new CaptchaException();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          // 用户验证
 | 
	
		
			
				|  |  |          Authentication authentication = null;
 | 
	
		
			
				|  |  |          try {
 |