Эх сурвалжийг харах

fix:空指针判断问题

lileilei 2 жил өмнө
parent
commit
9aaafca97a

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

@@ -323,7 +323,7 @@ public class HealthCodeServiceImpl implements HealthCodeService {
             final PlaceInfoVO finalPlaceInfoVO = placeInfoVO;
             final HealtCodeUserVO finalUserVO = userVO;
             executor.execute(() -> {
-                if (finalPlaceInfoVO.getScenicFlag() && finalUserVO.getIsOpen().equals(HealthOpenEnum.RELEASE.getCode())) {
+                if (finalPlaceInfoVO != null && finalPlaceInfoVO.getScenicFlag() && finalUserVO.getIsOpen().equals(HealthOpenEnum.RELEASE.getCode())) {
                     scenicServer.consume(new ScenicConsumeDTO().setIdNumber(shortTermDTO.getIdNumber()).setReservationCode(NumberUtil.isNumber(shortTermDTO.getHealthCode()) ? shortTermDTO.getHealthCode() : StrUtil.EMPTY));
                 }
             });