bridge 1 년 전
부모
커밋
10f65c9981
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/main/java/cn/fastfun/service/impl/AppDeviceLogServiceImpl.java

+ 3 - 1
src/main/java/cn/fastfun/service/impl/AppDeviceLogServiceImpl.java

@@ -158,7 +158,9 @@ public class AppDeviceLogServiceImpl extends JpaServiceImp<AppDeviceLog, String>
             Calendar cal = Calendar.getInstance();
             cal.setTime(new Date());
             Long time1 = cal.getTimeInMillis();
-            cal.setTime((Date) bmsData.get("status_time"));
+            if (!StringUtils.isEmpty(bmsData.get("status_time"))) {
+                cal.setTime((Date) bmsData.get("status_time"));
+            }
             Long time2 = cal.getTimeInMillis();
             if (!StringUtils.isEmpty(bmsData.get("status_time")) && (time1 - time2) / 1000.0 / 3600 > 6) {
                 checkDataConnectResult = false;