Эх сурвалжийг харах

[fix]
1、放开短信校验

limeng 4 сар өмнө
parent
commit
97a774174e

+ 8 - 8
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/LoginToWebsiteController.java

@@ -280,14 +280,14 @@ public class LoginToWebsiteController {
             @MyRequestBody String countryCode) throws UnsupportedEncodingException
     {
         // 校验短信验证码
-//        String smsCodeKey = CacheConstants.getSmsCodeKey(loginMoblie);
-//        RBucket<String> bucket = redissonClient.getBucket(smsCodeKey);
-//        String redisCode = bucket.get();
-//        if(StringUtils.isBlank(redisCode) || !redisCode.equals(smsCode)){
-//            return ResponseResult.error(ErrorCodeEnum.SMS_CODE_ERR);
-//        }
-//        // 短信验证码校验成功,清除验证码
-//        bucket.delete();
+        String smsCodeKey = CacheConstants.getSmsCodeKey(loginMoblie);
+        RBucket<String> bucket = redissonClient.getBucket(smsCodeKey);
+        String redisCode = bucket.get();
+        if(StringUtils.isBlank(redisCode) || !redisCode.equals(smsCode)){
+            return ResponseResult.error(ErrorCodeEnum.SMS_CODE_ERR);
+        }
+        // 短信验证码校验成功,清除验证码
+        bucket.delete();
         // 查询用户信息
         TourUser tourUser = tourUserService.getOne(Wrappers.<TourUser>lambdaQuery().eq(TourUser::getMobile, loginMoblie));
         // 如果用户信息不存在,则新建