Quellcode durchsuchen

推送数据 中时间格式修改

miaolijing vor 3 Jahren
Ursprung
Commit
dea32d92e5

+ 2 - 2
src/main/java/com/persagy/apm/diagnose/maintenance/service/impl/ProjectDataRecordServiceImpl.java

@@ -299,7 +299,7 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
             }
             Map<String, List<MonitorIndicatorRecord>> timeKeyAndRecordList = new LinkedHashMap<>();
             for (MonitorIndicatorRecord record : list) {
-                String timeKey = com.persagy.apm.diagnose.utils.DateUtils.date2Str(record.getDataTime(), com.persagy.apm.diagnose.utils.DateUtils.SDF_SECOND);
+                String timeKey = com.persagy.apm.diagnose.utils.DateUtils.date2Str(record.getDataTime(), com.persagy.apm.diagnose.utils.DateUtils.SDFSECOND);
                 if (!timeKeyAndRecordList.containsKey(timeKey)) {
                     timeKeyAndRecordList.put(timeKey, new ArrayList<>());
                 }
@@ -312,7 +312,7 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
                     continue;
                 }
                 sendTimeKeyAndDataList.put(dateListEntry.getKey(),value);
-                endTime = com.persagy.apm.diagnose.utils.DateUtils.str2Date(dateListEntry.getKey(), com.persagy.apm.diagnose.utils.DateUtils.SDF_SECOND);
+                endTime = com.persagy.apm.diagnose.utils.DateUtils.str2Date(dateListEntry.getKey(), com.persagy.apm.diagnose.utils.DateUtils.SDFSECOND);
             }
             String sentValue = CollectDataUtil.batchBuildSendParam(sendTimeKeyAndDataList,alarmItemCode);
             AlarmWebSocketServer.sendMsgToClients(projectId, sentValue);