Ver código fonte

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

lileilei 2 anos atrás
pai
commit
3699f800f1

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