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 -> {