空对象处理

This commit is contained in:
feng
2026-01-22 14:47:05 +08:00
parent 3a8252e81d
commit fdd6fce15c
@@ -402,7 +402,7 @@ public class WatchServiceImpl implements IWatchService {
periodList.add(new JSONObject().fluentPut("wdType", wdType)); periodList.add(new JSONObject().fluentPut("wdType", wdType));
} }
} }
return periodList.parallelStream().map(jsonValue -> { return periodList.stream().filter(Objects::nonNull).map(jsonValue -> {
JSONObject item = (JSONObject) jsonValue; JSONObject item = (JSONObject) jsonValue;
WatchH5IndexItemVo itemVo = item.toJavaObject(WatchH5IndexItemVo.class); WatchH5IndexItemVo itemVo = item.toJavaObject(WatchH5IndexItemVo.class);
if (Objects.isNull(itemVo.getWarnMax())) { if (Objects.isNull(itemVo.getWarnMax())) {