From 6bfc75286b6c36ba902977affe3d2bde166b44cb Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 4 Jan 2024 20:47:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=91=E7=AB=AF=E5=BD=95?= =?UTF-8?q?=E5=83=8F=E6=9F=A5=E8=AF=A2=E7=9A=84=E6=97=B6=E9=97=B4=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/service/impl/CloudRecordServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/CloudRecordServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/CloudRecordServiceImpl.java index 17752b537..01eb8c990 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/CloudRecordServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/CloudRecordServiceImpl.java @@ -109,8 +109,8 @@ public class CloudRecordServiceImpl implements ICloudRecordService { }else { endDate = LocalDate.of(year, month + 1, 1); } - long startTimeStamp = startDate.atStartOfDay().toInstant(ZoneOffset.ofHours(8)).getEpochSecond(); - long endTimeStamp = endDate.atStartOfDay().toInstant(ZoneOffset.ofHours(8)).getEpochSecond(); + long startTimeStamp = startDate.atStartOfDay().toInstant(ZoneOffset.ofHours(8)).getEpochSecond() * 1000; + long endTimeStamp = endDate.atStartOfDay().toInstant(ZoneOffset.ofHours(8)).getEpochSecond() * 1000; List cloudRecordItemList = cloudRecordServiceMapper.getList(null, app, stream, startTimeStamp, endTimeStamp, null, mediaServerItems); if (cloudRecordItemList.isEmpty()) { @@ -159,10 +159,10 @@ public class CloudRecordServiceImpl implements ICloudRecordService { Long startTimeStamp = null; Long endTimeStamp = null; if (startTime != null) { - startTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(startTime); + startTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(startTime) * 1000; } if (endTime != null) { - endTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(endTime); + endTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(endTime) * 1000; } List mediaServers = new ArrayList<>(); @@ -206,14 +206,14 @@ public class CloudRecordServiceImpl implements ICloudRecordService { if (!DateUtil.verification(startTime, DateUtil.formatter)) { throw new ControllerException(ErrorCode.ERROR100.getCode(), "开始时间格式错误,正确格式为: " + DateUtil.formatter); } - startTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(startTime); + startTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(startTime) * 1000; } if (endTime != null ) { if (!DateUtil.verification(endTime, DateUtil.formatter)) { throw new ControllerException(ErrorCode.ERROR100.getCode(), "结束时间格式错误,正确格式为: " + DateUtil.formatter); } - endTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(endTime); + endTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(endTime) * 1000; }