admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/SMSController.java
@@ -42,6 +42,10 @@
   @RequestSerializableByKey(key = "#phone+'-'+#uid+'-'+#type")
   @RequestMapping(value = "sendSMS", method = RequestMethod.POST)
   public void sendMSM(AcceptData acceptData, String phone, Long uid, Integer type, PrintWriter out) {
      if (Constant.IS_TEST) {
         out.print(JsonUtil.loadTrueResult("发送成功"));
         return;
      }
      sendMSM(acceptData, phone, uid, type, StringUtil.Md5(phone + "-" + "-" + uid + "-" + type), out);
   }
@@ -86,7 +90,7 @@
         return;
      }
      phone = phone.replaceAll(" ", "");
      if (Constant.IS_TEST) {
         out.print(JsonUtil.loadTrueResult("发送成功"));
         return;
@@ -105,7 +109,7 @@
    */
   @RequestSerializableByKey(key = "#acceptData.device+'-'+#phone")
   @RequestMapping(value = "sendMSMBind", method = RequestMethod.POST)
   public void sendMSMBind(AcceptData acceptData, String phone, boolean slideVerify, PrintWriter out) {
   public void sendMSMBind(AcceptData acceptData, String phone, boolean slideVerify, Long uid, PrintWriter out) {
      if (phone == null || !StringUtil.isMobile(phone.replaceAll(" ", ""))) {
         out.print(JsonUtil.loadFalseResult(1, "手机号输入有误,请修改"));
         return;
@@ -125,7 +129,7 @@
      //
      // 判断手机号码是否被封禁
      UserInfo phoneUser = userInfoService.getEffectiveUserInfoByPhone(phone);
      if (phoneUser != null) {
      if (phoneUser != null && uid != null) {
         out.print(JsonUtil.loadFalseResult(9001, "该电话号码被占用"));
         return;
      }
@@ -134,7 +138,7 @@
         out.print(JsonUtil.loadTrueResult("发送成功"));
         return;
      }
      sendMSNnew(phone, slideVerify, 2, StringUtil.Md5(phone + "-" + acceptData.getDevice()), out);
   }
@@ -144,10 +148,10 @@
         String cachekey = null;
         if (type == 1) {
            // 登录验证码
            cachekey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSLoginCount, phone + "" );
            cachekey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSLoginCount, phone + "");
         } else if (type == 2) {
            // 绑定验证码
            cachekey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSBindCount, phone + "" );
            cachekey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSBindCount, phone + "");
         }
         if (cachekey == null) {