From 84e662f08969a970f9c1289036669be5cda06594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Tue, 1 Aug 2023 14:11:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=80=9A=E8=AE=AF=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=E7=9A=84=E6=9C=80=E5=90=8E=E4=B8=80=E5=B0=8F=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E8=BF=90=E8=A1=8C=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/config/service/impl/CentralMonitorServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java index 34b2d03..7d9bc9b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java @@ -16,6 +16,7 @@ import com.hnac.hzinfo.sdk.core.response.HzPage; import com.hnac.hzinfo.sdk.core.response.Result; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.springblade.core.log.exception.ServiceException; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.StringUtil; @@ -91,13 +92,13 @@ public class CentralMonitorServiceImpl implements CentralMonitorService { OriginalDataQuery originalDataQuery = new OriginalDataQuery(); originalDataQuery.setRealId(roleId); originalDataQuery.setLimit(size); - LocalDateTime startTime = LocalDateTime.now(); - LocalDateTime endTime = startTime.minusHours(1); + LocalDateTime endTime = LocalDateTime.now(); + LocalDateTime startTime = endTime.minusHours(1); originalDataQuery.setBeginTime(this.getOriginalDate(startTime)); originalDataQuery.setEndTime(this.getOriginalDate(endTime)); Result> originalDataByRealIds = historyDataSearchClient.getOriginalDataByRealIds(originalDataQuery); if (!originalDataByRealIds.isSuccess()) { - throw new IllegalArgumentException("数据不存在"); + throw new ServiceException("数据不存在"); } HzPage data = originalDataByRealIds.getData(); List collect = data.getRecords().stream().map(item -> {