guomengjiao 5 일 전
부모
커밋
1870a47269

+ 0 - 1
renren-admin/src/main/java/io/renren/modules/qyh/model/dto/AuthParamDTO.java

@@ -26,7 +26,6 @@ public class AuthParamDTO implements Serializable {
     @ApiModelProperty(value = "邀请码")
     private String inviteCode;
 
-    @NotBlank(message="图形验证码不能为空")
     @ApiModelProperty(value = "图形验证码", required = true)
     private String captcha;
 

+ 18 - 18
renren-admin/src/main/java/io/renren/modules/qyh/service/impl/ApiAuthServiceImpl.java

@@ -186,30 +186,30 @@ public class ApiAuthServiceImpl implements ApiAuthService {
         String openid = dto.getOpenid();
         String captcha = dto.getCaptcha();
         // 鉴权验证码失效
-        String value = redisUtils.get(Constants.CAPTCHA_APPLETS + openid);
-        if (StrUtil.isBlank(value)) {
-            return R.error(501, "图形验证码需要重新获取");
-        }
-
-        if (!value.equalsIgnoreCase(captcha)) {
-            return R.error(502, "图形验证码填写不正确");
-        }
-        redisUtils.delete("captcha:applets" + openid);
+//        String value = redisUtils.get(Constants.CAPTCHA_APPLETS + openid);
+//        if (StrUtil.isBlank(value)) {
+//            return R.error(501, "图形验证码需要重新获取");
+//        }
+//
+//        if (!value.equalsIgnoreCase(captcha)) {
+//            return R.error(502, "图形验证码填写不正确");
+//        }
+//        redisUtils.delete("captcha:applets" + openid);
 
         String mobile = dto.getMobile();
         if (!PhoneFormatCheckUtils.isPhoneLegal(mobile)) {
             throw new RRException("手机号格式不正确");
         }
 
-        String mobileCaptcha = redisUtils.get("SmsCode:" + mobile);
-        String shortMessageCode = dto.getShortMessageCode();
-        //todo 暂时注释掉
-       if (StrUtil.isNotBlank(shortMessageCode)) {
-           if (!StrUtil.equals(mobileCaptcha, shortMessageCode)) {
-               throw new RRException("短信验证码失效");
-           }
-           redisUtils.delete("SmsCode:" + mobile);
-       }
+//        String mobileCaptcha = redisUtils.get("SmsCode:" + mobile);
+//        String shortMessageCode = dto.getShortMessageCode();
+//        //todo 暂时注释掉
+//       if (StrUtil.isNotBlank(shortMessageCode)) {
+//           if (!StrUtil.equals(mobileCaptcha, shortMessageCode)) {
+//               throw new RRException("短信验证码失效");
+//           }
+//           redisUtils.delete("SmsCode:" + mobile);
+//       }
 
         String inviteCode = dto.getInviteCode();
         MemberInfoEntity memberInfoInviteCode = null;