admin
2020-03-01 ec8a1c6f81b5747e9efce86faaba33d10df7f61d
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/SMSController.java
@@ -15,6 +15,8 @@
import com.yeshi.fanli.service.inter.user.ForbiddenUserIdentifyCodeService;
import com.yeshi.fanli.service.inter.user.SMSService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.RedisKeyEnum;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
@@ -40,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);
   }
@@ -84,6 +90,11 @@
         return;
      }
      phone = phone.replaceAll(" ", "");
      if (Constant.IS_TEST) {
         out.print(JsonUtil.loadTrueResult("发送成功"));
         return;
      }
      sendMSNnew(phone, slideVerify, 1, StringUtil.Md5(phone + "-" + acceptData.getDevice()), out);
   }
@@ -123,6 +134,11 @@
         return;
      }
      if (Constant.IS_TEST) {
         out.print(JsonUtil.loadTrueResult("发送成功"));
         return;
      }
      sendMSNnew(phone, slideVerify, 2, StringUtil.Md5(phone + "-" + acceptData.getDevice()), out);
   }
@@ -132,10 +148,10 @@
         String cachekey = null;
         if (type == 1) {
            // 登录验证码
            cachekey = "sendMSNLoginCount" + phone;
            cachekey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSLoginCount, phone + "" );
         } else if (type == 2) {
            // 绑定验证码
            cachekey = "sendMSNBindCount" + phone;
            cachekey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSBindCount, phone + "" );
         }
         if (cachekey == null) {