소스 검색

修复bug

sola 1 년 전
부모
커밋
4c33cd5a3c
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxApiServiceImpl.java

+ 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;