sola 1 år sedan
förälder
incheckning
4c33cd5a3c

+ 4 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxApiServiceImpl.java

@@ -8,6 +8,7 @@ import com.rongwei.bscommon.sys.utils.HwSmsUtil;
 import com.rongwei.bsentity.vo.ZhcxOutsideInspectionVo;
 import com.rongwei.commonservice.service.RedisService;
 import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -45,6 +46,9 @@ public class ZhcxApiServiceImpl implements ZhcxApiService {
         String account = (String) accountObj;
         boolean exists = redisService.hasKey(loginType + phone);
         String sendCodeTimeObj = (String) redisService.getRedisCatchObj(loginType + phone);
+        if (StringUtils.isBlank(sendCodeTimeObj)) {
+            sendCodeTimeObj = "0";
+        }
         int sendCodeTime = Integer.parseInt(sendCodeTimeObj);
         if( exists && sendCodeTime >= 3 ){
             sendCodeTime += 1;