소스 검색

fix:数值类型判断严谨性问题

lileilei 2 년 전
부모
커밋
3699f800f1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/yixin/ms/service/impl/HealthCodeServiceImpl.java

+ 1 - 1
src/main/java/com/yixin/ms/service/impl/HealthCodeServiceImpl.java

@@ -261,7 +261,7 @@ public class HealthCodeServiceImpl implements HealthCodeService {
             if(!HealthCodeLevelEnum.GREEN.getDesc().equals(codeTypeVO.getMzt())){
                 userVO.setIsOpen(HealthOpenEnum.NO_THOROUGHFARE.getCode());
                 userVO.setOpenMsg(new StringBuilder().append(codeTypeVO.getMzt()).append("禁止通行").toString());
-            }else if(!nucleicExpirationTime.equals(0) && (CollectionUtils.isEmpty(nucleinList) || DateUtil.betweenMs(nucleinList.stream().findFirst().get().getChecktime(), DateUtil.date()) > nucleicExpirationTime * 60 * 60 * 1000)){
+            }else if(nucleicExpirationTime != null && !nucleicExpirationTime.equals(0) && (CollectionUtils.isEmpty(nucleinList) || DateUtil.betweenMs(nucleinList.stream().findFirst().get().getChecktime(), DateUtil.date()) > nucleicExpirationTime * 60 * 60 * 1000)){
                 userVO.setIsOpen(HealthOpenEnum.NO_THOROUGHFARE.getCode());
                 userVO.setOpenMsg(new StringBuilder().append(nucleicExpirationTime).append("小时内无有效核酸阴性记录,禁止通行").toString());
             }else{