admin
2019-08-15 eb78e9183005efa02064956cc9ef2299dc2d2bdd
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/SMSController.java
@@ -37,12 +37,12 @@
   // 发送短信
   @RequestSerializableByKey(key = "#phone+'-'+#uid+'-'+#type")
   @RequestMapping(value = "sendSMS", method = RequestMethod.POST)
   public void sendMSM(AcceptData acceptData, String phone, Long uid, Integer type, PrintWriter out) {
      sendMSM(acceptData, phone, uid, type, StringUtil.Md5(phone + "-" + "-" + uid + "-" + type), out);
   }
   @RequestSerializableByKey(key = "key")
   public void sendMSM(AcceptData acceptData, String phone, Long uid, Integer type, String key, PrintWriter out) {
      try {
         if (phone.contains("**") && uid != null && uid > 0) {
@@ -69,9 +69,9 @@
      }
   }
   
   /**
    * 1.5.3  登录发送短信
    *
    * @param acceptData
    * @param phone
    * @param uid
@@ -88,14 +88,15 @@
      sendMSNnew(phone,slideVerify, 1, StringUtil.Md5(phone + "-" + acceptData.getDevice()), out);
   }
   /**
    * 1.5.3 绑定发送短信
    *
    * @param acceptData
    * @param phone
    * @param uid
    * @param out
    */
   @RequestSerializableByKey(key = "#acceptData.device+'-'+#phone")
   @RequestMapping(value = "sendMSMBind", method = RequestMethod.POST)
   public void sendMSMBind(AcceptData acceptData, String phone, boolean slideVerify, PrintWriter out) {
      if (phone == null || !StringUtil.isMobile(phone.replaceAll(" ", ""))) {
@@ -105,9 +106,12 @@
      phone = phone.replaceAll(" ", "");
      
      // 判断手机号码是否被封禁
//      ForbiddenUserIdentifyCode identifyCode1 = forbiddenUserIdentifyCodeService
//            .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.phone, phone);
//      if (identifyCode1 != null && identifyCode1.getEffective() != null && identifyCode1.getEffective()) {
      // ForbiddenUserIdentifyCode identifyCode1 =
      // forbiddenUserIdentifyCodeService
      // .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.phone,
      // phone);
      // if (identifyCode1 != null && identifyCode1.getEffective() != null &&
      // identifyCode1.getEffective()) {
//         out.print(JsonUtil.loadFalseResult(9001,"该电话号码被占用"));
//         return;
//      }
@@ -122,8 +126,6 @@
      sendMSNnew(phone,slideVerify, 2, StringUtil.Md5(phone + "-" + acceptData.getDevice()), out);
   }
   
   @RequestSerializableByKey(key = "key")
   public void sendMSNnew(String phone, boolean slideVerify, int type, String key, PrintWriter out) {
      try {
         int count = 0;
@@ -158,7 +160,6 @@
         // 缓存一个小时
         count ++;
         redisManager.cacheCommonString(cachekey, count + "", 60 * 60);
         
         if (type == 1) {
            // 登录验证码