From f3f7cdd9843aac45cc7f0c7c645fd3833ee9864f Mon Sep 17 00:00:00 2001 From: ffr <492210217@qq.com> Date: Tue, 9 Apr 2024 08:42:51 +0800 Subject: [PATCH 1/4] commit upd ffr --- couplet-modules/couplet-system/src/main/resources/bootstrap.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/couplet-modules/couplet-system/src/main/resources/bootstrap.yml b/couplet-modules/couplet-system/src/main/resources/bootstrap.yml index d9315bd..859221a 100644 --- a/couplet-modules/couplet-system/src/main/resources/bootstrap.yml +++ b/couplet-modules/couplet-system/src/main/resources/bootstrap.yml @@ -15,9 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 config: # 配置中心地址 server-addr: 121.89.211.230:8848 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 # 配置文件格式 file-extension: yml # 共享配置 From f2463c97539a1b973bd8982d71b0ef19c6ef6d65 Mon Sep 17 00:00:00 2001 From: lijiayao <13831655+xiao-yao-charge-forward@user.noreply.gitee.com> Date: Thu, 4 Apr 2024 08:58:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E6=A1=86?= =?UTF-8?q?=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/couplet/common/redis/service/RedisService.java | 6 +++--- .../couplet/analyze/msg/model/ModelsKafkaMessage.java | 2 +- .../msg/service/impl/ElectronicFenceServiceImpl.java | 8 ++++---- .../service/impl/VehicleDetectionServiceImpl.java | 10 ++++++---- .../couplet-business/src/main/resources/bootstrap.yml | 2 ++ .../java/com/couplet/online/utils/MqttMonitor.java | 2 +- .../src/main/resources/bootstrap.yml | 4 ++-- 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/couplet-common/couplet-common-redis/src/main/java/com/couplet/common/redis/service/RedisService.java b/couplet-common/couplet-common-redis/src/main/java/com/couplet/common/redis/service/RedisService.java index c02b7a9..39204c6 100644 --- a/couplet-common/couplet-common-redis/src/main/java/com/couplet/common/redis/service/RedisService.java +++ b/couplet-common/couplet-common-redis/src/main/java/com/couplet/common/redis/service/RedisService.java @@ -296,13 +296,13 @@ public class RedisService { * * @return 对象列表 */ - public Collection keys (final String pattern) { + public Collection keys (final String pattern) { return redisTemplate.keys(pattern); } public void setVinAndUserId(RealTimeDataRequest realTimeDataRequest) { - String key = "vin:"+realTimeDataRequest.getVin(); - redisTemplate.opsForValue().set(key, realTimeDataRequest); + String key = "vin:" + realTimeDataRequest.getVin(); + redisTemplate.opsForSet().add(key,realTimeDataRequest); } public void stopViewingData(String vin) { diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelsKafkaMessage.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelsKafkaMessage.java index 0a40e9a..6c4deac 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelsKafkaMessage.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelsKafkaMessage.java @@ -36,7 +36,7 @@ import static java.lang.Thread.sleep; @Component @Slf4j public class ModelsKafkaMessage { - private static final String TOPIC_NAME = "online"; + private static final String TOPIC_NAME = "fufanrui"; private static final String BOOTSTRAP_SERVERS = "39.103.133.136:9092"; diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/ElectronicFenceServiceImpl.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/ElectronicFenceServiceImpl.java index cadfc55..c2d48b9 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/ElectronicFenceServiceImpl.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/ElectronicFenceServiceImpl.java @@ -46,10 +46,10 @@ public class ElectronicFenceServiceImpl implements IncidentService { if (redisService.hasKey(fenceKey)) { Set cacheSet = redisService.getCacheSet(fenceKey); log.info("电子围栏事件redis存在......."); -// jingdu; -// longitude; -// weidu; -// latitude; + //jingdu; + //longitude; + //weidu; + //latitude; for (Fence fence : cacheSet) { String fenceLongitudeLatitude = fence.getFenceLongitudeLatitude(); /** diff --git a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java index 6923c2c..c7ec950 100644 --- a/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java +++ b/couplet-modules/couplet-business/src/main/java/com/couplet/business/server/service/impl/VehicleDetectionServiceImpl.java @@ -21,8 +21,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import springfox.documentation.spring.web.json.Json; +import java.lang.reflect.Array; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.Set; import java.util.concurrent.TimeUnit; /** @@ -53,10 +56,9 @@ public class VehicleDetectionServiceImpl implements VehicleDetectionService{ public List monitorinDataList(String vin) { String key = "vin:query:" + vin; log.info("key为:"+key); - CoupletMsgData coupletMsgData = redisService.getCacheObject(key); - ArrayList coupletMsgDataArrayList = new ArrayList<>(); - coupletMsgDataArrayList.add(coupletMsgData); - return coupletMsgDataArrayList; + Set cacheSet = redisService.getCacheSet(key); + ArrayList coupletMsgData = new ArrayList<>(cacheSet); + return coupletMsgData; } @Override diff --git a/couplet-modules/couplet-business/src/main/resources/bootstrap.yml b/couplet-modules/couplet-business/src/main/resources/bootstrap.yml index d900876..ff5fb2c 100644 --- a/couplet-modules/couplet-business/src/main/resources/bootstrap.yml +++ b/couplet-modules/couplet-business/src/main/resources/bootstrap.yml @@ -16,9 +16,11 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 config: # 配置中心地址 server-addr: 121.89.211.230:8848 + namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/utils/MqttMonitor.java b/couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/utils/MqttMonitor.java index feece3e..b3275e6 100644 --- a/couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/utils/MqttMonitor.java +++ b/couplet-modules/couplet-modules-onLine/src/main/java/com/couplet/online/utils/MqttMonitor.java @@ -76,7 +76,7 @@ public class MqttMonitor { //Kafka生产者配置 - private static final String TOPIC_NAME = "xiaoYao"; + private static final String TOPIC_NAME = "fufanrui"; private static final String BOOTSTRAP_SERVERS = "39.103.133.136:9092"; //线程池,用于异步处理消息到来时的业务逻辑 diff --git a/couplet-modules/couplet-modules-onLine/src/main/resources/bootstrap.yml b/couplet-modules/couplet-modules-onLine/src/main/resources/bootstrap.yml index fc1f9a1..1c79143 100644 --- a/couplet-modules/couplet-modules-onLine/src/main/resources/bootstrap.yml +++ b/couplet-modules/couplet-modules-onLine/src/main/resources/bootstrap.yml @@ -36,7 +36,7 @@ mqtt: # broker: mqtt://115.159.47.13:1883 username: password: - clientId: xiaoYao + clientId: fufanrui44 qos: 0 - topic: xiaoYao + topic: test898 From 395b4cc5a58812272df337b3d2d76ae0dd43d077 Mon Sep 17 00:00:00 2001 From: ffr <492210217@qq.com> Date: Tue, 9 Apr 2024 15:23:44 +0800 Subject: [PATCH 3/4] commit upd --- ...pringframework.boot.autoconfigure.AutoConfiguration.imports | 3 +++ 1 file changed, 3 insertions(+) diff --git a/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index f797d3a..6710490 100644 --- a/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,2 +1,5 @@ com.couplet.remote.factory.RemoteVehicleFallbackFactory +<<<<<<< HEAD com.couplet.remote.factory.RemoteTroubleFallbackFactory +======= +>>>>>>> f07dc73 (远程调用 加自动配置扫描) From 9822f2f548dba0bd135eaa5538823f3ddaa5d322 Mon Sep 17 00:00:00 2001 From: ffr <492210217@qq.com> Date: Tue, 9 Apr 2024 16:05:16 +0800 Subject: [PATCH 4/4] commit upd --- ...pringframework.boot.autoconfigure.AutoConfiguration.imports | 3 --- 1 file changed, 3 deletions(-) diff --git a/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 6710490..f797d3a 100644 --- a/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/couplet-common/couplet-common-business/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,5 +1,2 @@ com.couplet.remote.factory.RemoteVehicleFallbackFactory -<<<<<<< HEAD com.couplet.remote.factory.RemoteTroubleFallbackFactory -======= ->>>>>>> f07dc73 (远程调用 加自动配置扫描)