From f9de44862be408cbcb2cd1078f790fc90c36db19 Mon Sep 17 00:00:00 2001 From: xiepufeng <1072271977@qq.com> Date: Fri, 12 Apr 2024 14:02:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B1=BB=E5=90=8D=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/controller/DcTrafficStatisticsController.java | 4 ++-- .../message/device/handler/DeviceMessageHandler.java | 2 +- ...tisticsService.java => IDcTrafficStatisticsService.java} | 6 +++++- ...astService.java => IDcTrafficVolumeForecastService.java} | 2 +- .../service/impl/DcTrafficStatisticsServiceImpl.java | 4 ++-- .../service/impl/DcTrafficVolumeForecastServiceImpl.java | 4 ++-- .../com/zc/business/statistics/handler/TrafficAnalysis.java | 4 ++-- 7 files changed, 15 insertions(+), 11 deletions(-) rename zc-business/src/main/java/com/zc/business/service/{DcTrafficStatisticsService.java => IDcTrafficStatisticsService.java} (92%) rename zc-business/src/main/java/com/zc/business/service/{DcTrafficVolumeForecastService.java => IDcTrafficVolumeForecastService.java} (62%) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcTrafficStatisticsController.java b/zc-business/src/main/java/com/zc/business/controller/DcTrafficStatisticsController.java index 0f799cf9..8990ffd0 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcTrafficStatisticsController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcTrafficStatisticsController.java @@ -6,7 +6,7 @@ import com.zc.business.domain.DcTrafficMetricsData; import com.zc.business.domain.DcTrafficSectionData; import com.zc.business.request.DcTrafficMetricsDataRequest; import com.zc.business.request.DcTrafficSectionDataRequest; -import com.zc.business.service.DcTrafficStatisticsService; +import com.zc.business.service.IDcTrafficStatisticsService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -25,7 +25,7 @@ import java.util.List; public class DcTrafficStatisticsController { @Autowired - private DcTrafficStatisticsService dcTrafficStatisticsService; + private IDcTrafficStatisticsService dcTrafficStatisticsService; /** diff --git a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java index d2c12a66..b601d32c 100644 --- a/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java +++ b/zc-business/src/main/java/com/zc/business/message/device/handler/DeviceMessageHandler.java @@ -53,7 +53,7 @@ public class DeviceMessageHandler { private RedisCache redisCache; @Resource - private DcTrafficStatisticsService dcTrafficSectionDataService; + private IDcTrafficStatisticsService dcTrafficSectionDataService; @Autowired private IDcMeteorologicalDetectorDataService meteorologicalDetectorDataService; diff --git a/zc-business/src/main/java/com/zc/business/service/DcTrafficStatisticsService.java b/zc-business/src/main/java/com/zc/business/service/IDcTrafficStatisticsService.java similarity index 92% rename from zc-business/src/main/java/com/zc/business/service/DcTrafficStatisticsService.java rename to zc-business/src/main/java/com/zc/business/service/IDcTrafficStatisticsService.java index 1fddc4ba..bb2cae07 100644 --- a/zc-business/src/main/java/com/zc/business/service/DcTrafficStatisticsService.java +++ b/zc-business/src/main/java/com/zc/business/service/IDcTrafficStatisticsService.java @@ -10,7 +10,11 @@ import com.zc.business.request.DcTrafficSectionDataRequest; import java.util.List; -public interface DcTrafficStatisticsService extends IService { +/** + * 交通统计服务接口,提供处理交通数据的相关方法 + * @author xiepufeng + */ +public interface IDcTrafficStatisticsService extends IService { /** * 处理实时接收到的一类交流站设备消息,并将其转换为交通断面统计数据对象并缓存。 diff --git a/zc-business/src/main/java/com/zc/business/service/DcTrafficVolumeForecastService.java b/zc-business/src/main/java/com/zc/business/service/IDcTrafficVolumeForecastService.java similarity index 62% rename from zc-business/src/main/java/com/zc/business/service/DcTrafficVolumeForecastService.java rename to zc-business/src/main/java/com/zc/business/service/IDcTrafficVolumeForecastService.java index 7e7586ee..06cb035e 100644 --- a/zc-business/src/main/java/com/zc/business/service/DcTrafficVolumeForecastService.java +++ b/zc-business/src/main/java/com/zc/business/service/IDcTrafficVolumeForecastService.java @@ -3,5 +3,5 @@ package com.zc.business.service; import com.baomidou.mybatisplus.extension.service.IService; import com.zc.business.domain.DcTrafficVolumeForecast; -public interface DcTrafficVolumeForecastService extends IService { +public interface IDcTrafficVolumeForecastService extends IService { } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficStatisticsServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficStatisticsServiceImpl.java index de1c91fc..b54ec8e6 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficStatisticsServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficStatisticsServiceImpl.java @@ -19,7 +19,7 @@ import com.zc.business.request.DcTrafficMetricsDataRequest; import com.zc.business.request.DcTrafficSectionDataRequest; import com.zc.business.statistics.cache.*; import com.zc.business.mapper.DcTrafficSectionDataMapper; -import com.zc.business.service.DcTrafficStatisticsService; +import com.zc.business.service.IDcTrafficStatisticsService; import com.zc.business.statistics.handler.TrafficAnalysis; import com.zc.business.statistics.handler.TrafficStatistics; import com.zc.business.utils.StakeMarkUtils; @@ -44,7 +44,7 @@ import java.util.stream.Collectors; @Service public class DcTrafficStatisticsServiceImpl extends ServiceImpl - implements DcTrafficStatisticsService { + implements IDcTrafficStatisticsService { // 日志记录器 protected final Logger logger = LoggerFactory.getLogger(this.getClass()); diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficVolumeForecastServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficVolumeForecastServiceImpl.java index eee59c30..e7703800 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficVolumeForecastServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcTrafficVolumeForecastServiceImpl.java @@ -3,7 +3,7 @@ package com.zc.business.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zc.business.domain.DcTrafficVolumeForecast; import com.zc.business.mapper.DcTrafficVolumeForecastMapper; -import com.zc.business.service.DcTrafficVolumeForecastService; +import com.zc.business.service.IDcTrafficVolumeForecastService; import org.springframework.stereotype.Service; /** @@ -14,6 +14,6 @@ import org.springframework.stereotype.Service; @Service public class DcTrafficVolumeForecastServiceImpl extends ServiceImpl - implements DcTrafficVolumeForecastService { + implements IDcTrafficVolumeForecastService { } diff --git a/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficAnalysis.java b/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficAnalysis.java index 7c94fa24..e0bbe6b2 100644 --- a/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficAnalysis.java +++ b/zc-business/src/main/java/com/zc/business/statistics/handler/TrafficAnalysis.java @@ -8,7 +8,7 @@ import com.zc.business.constant.StakeMarkConstant; import com.zc.business.domain.*; import com.zc.business.enums.*; import com.zc.business.request.DcTrafficMetricsDataRequest; -import com.zc.business.service.DcTrafficVolumeForecastService; +import com.zc.business.service.IDcTrafficVolumeForecastService; import com.zc.business.utils.AlgorithmUtils; import com.zc.business.utils.StakeMarkUtils; import org.springframework.stereotype.Component; @@ -32,7 +32,7 @@ public class TrafficAnalysis { private RedisCache redisCache; @Resource - private DcTrafficVolumeForecastService dcTrafficVolumeForecastService; + private IDcTrafficVolumeForecastService dcTrafficVolumeForecastService; // 使用ConcurrentHashMap来缓存路段ID和设计交通量,以提高并发性能和减少数据库访问 private static final Map> designTrafficVolumeCache = new HashMap<>();