Jelajahi Sumber

大屏统计

chejianzheng 1 bulan lalu
induk
melakukan
7400709dd1

+ 3 - 0
portal-service-infrastructure/src/main/java/com/hfln/portal/infrastructure/gateway/impl/WebStatsGatewayImpl.java

@@ -209,6 +209,9 @@ public class WebStatsGatewayImpl implements WebStatsGateway {
         res.setSystemGuardDay((int) ChronoUnit.DAYS.between(tenant.getCreateTime(), LocalDateTime.now()));
 
         Map<String, BigDecimal> statInfo = devInfoService.queryStatInfo(params.getTenantId());
+        if (statInfo == null) {
+            return res;
+        }
         res.setDeviceCount(statInfo.get("deviceCount") == null ? 0 :statInfo.get("deviceCount").intValue());
         res.setOnlineCount(statInfo.get("onlineCount") == null ? 0 :statInfo.get("onlineCount").intValue());