diff --git a/couplet-auth/src/main/resources/bootstrap.yml b/couplet-auth/src/main/resources/bootstrap.yml index 68c3c25..427f682 100644 --- a/couplet-auth/src/main/resources/bootstrap.yml +++ b/couplet-auth/src/main/resources/bootstrap.yml @@ -17,11 +17,9 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 - namespace: 172469 config: # 配置中心地址 server-addr: 121.89.211.230:8848 - namespace: 172469 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/couplet-gateway/src/main/resources/bootstrap.yml b/couplet-gateway/src/main/resources/bootstrap.yml index 6dc39fe..091e68a 100644 --- a/couplet-gateway/src/main/resources/bootstrap.yml +++ b/couplet-gateway/src/main/resources/bootstrap.yml @@ -15,11 +15,9 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 - namespace: 172469 config: # 配置中心地址 server-addr: 121.89.211.230:8848 - namespace: 172469 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java index 0a53f09..c992ddc 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/model/ModelMessage.java @@ -108,7 +108,7 @@ public class ModelMessage { }); mqttClient.subscribe("test",0); - Thread.sleep(1000*60*10); + Thread.sleep(1000*6*10); } catch (Exception e) { throw new RuntimeException(e); } diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java index 18323de..3a5ca25 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/BreakdownServiceImpl.java @@ -1,38 +1,38 @@ -//package com.couplet.analyze.msg.service.impl; -// -//import com.couplet.analyze.msg.domain.CoupletMsgData; -//import com.couplet.analyze.msg.service.IncidentService; -//import com.couplet.common.log.annotation.Log; -//import lombok.extern.log4j.Log4j2; -//import org.springframework.stereotype.Service; -// -///** -// * @Author: LiJiaYao -// * @Date: 2024/4/2 -// * @Description: 故障事件 -// */ -//@Service("breakdown") -//@Log4j2 -//public class BreakdownServiceImpl implements IncidentService { -// /** -// * 故障事件 -// * -// * @param coupletMsgData -// */ -// @Override -// public void incident(CoupletMsgData coupletMsgData) { -// -// log.info("故障事件开始....."); -// log.info("故障事件结束....."); -// -// -// } -// -// /** -// * @return 获取事件名称 -// */ -// @Override -// public String getName() { -// return "breakdown"; -// } -//} +package com.couplet.analyze.msg.service.impl; + +import com.couplet.analyze.msg.domain.CoupletMsgData; +import com.couplet.analyze.msg.service.IncidentService; +import com.couplet.common.log.annotation.Log; +import lombok.extern.log4j.Log4j2; +import org.springframework.stereotype.Service; + +/** + * @Author: LiJiaYao + * @Date: 2024/4/2 + * @Description: 故障事件 + */ +@Service("breakdown") +@Log4j2 +public class BreakdownServiceImpl implements IncidentService { + /** + * 故障事件 + * + * @param coupletMsgData + */ + @Override + public void incident(CoupletMsgData coupletMsgData) { + + log.info("故障事件开始....."); + log.info("故障事件结束....."); + + + } + + /** + * @return 获取事件名称 + */ + @Override + public String getName() { + return "breakdown"; + } +} 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 50b62c2..bed51e1 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 @@ -1,33 +1,40 @@ -//package com.couplet.analyze.msg.service.impl; -// -//import com.couplet.analyze.msg.domain.CoupletMsgData; -//import com.couplet.analyze.msg.service.IncidentService; -//import org.springframework.stereotype.Service; -// -///** -// * @Author: LiJiaYao -// * @Date: 2024/4/2 -// * @Description: 电子围栏事件服务实现类 -// */ -//@Service("electronic-fence") -//public class ElectronicFenceServiceImpl implements IncidentService { -// -// -// /** -// * 电子围栏事件 -// * -// * @param coupletMsgData -// */ -// @Override -// public void incident(CoupletMsgData coupletMsgData) { -// -// } -// -// /** -// * @return 电子围栏service 名称 -// */ -// @Override -// public String getName() { -// return "electronic-fence"; -// } -//} +package com.couplet.analyze.msg.service.impl; + +import com.couplet.analyze.msg.domain.CoupletMsgData; +import com.couplet.analyze.msg.service.IncidentService; +import lombok.extern.log4j.Log4j2; +import org.springframework.stereotype.Service; + +/** + * @Author: LiJiaYao + * @Date: 2024/4/2 + * @Description: 电子围栏事件服务实现类 + */ +@Service("electronic-fence") +@Log4j2 +public class ElectronicFenceServiceImpl implements IncidentService { + + + /** + * 电子围栏事件 + * + * @param coupletMsgData + */ + @Override + public void incident(CoupletMsgData coupletMsgData) { + + log.info("电子围栏事件开始......."); + log.info("电子围栏事件结束......."); + + + + } + + /** + * @return 电子围栏service 名称 + */ + @Override + public String getName() { + return "electronic-fence"; + } +} diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java index 193ac3a..971e428 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/java/com/couplet/analyze/msg/service/impl/RealTimeDataServiceImpl.java @@ -1,33 +1,38 @@ -//package com.couplet.analyze.msg.service.impl; -// -//import com.couplet.analyze.msg.domain.CoupletMsgData; -//import com.couplet.analyze.msg.service.IncidentService; -//import org.springframework.stereotype.Service; -// -///** -// * @Author: LiJiaYao -// * @Date: 2024/4/2 -// * @Description: 实时数据事件 -// */ -//@Service("real-time-data") -//public class RealTimeDataServiceImpl implements IncidentService { -// -// /** -// * 实时数据事件 -// * -// * @param coupletMsgData -// */ -// @Override -// public void incident(CoupletMsgData coupletMsgData) { -// -// } -// -// /** -// * 实时数据事件 -// * @return -// */ -// @Override -// public String getName() { -// return "real-time-data"; -// } -//} +package com.couplet.analyze.msg.service.impl; + +import com.couplet.analyze.msg.domain.CoupletMsgData; +import com.couplet.analyze.msg.service.IncidentService; +import lombok.extern.log4j.Log4j2; +import org.springframework.stereotype.Service; + +/** + * @Author: LiJiaYao + * @Date: 2024/4/2 + * @Description: 实时数据事件 + */ +@Service("real-time-data") +@Log4j2 +public class RealTimeDataServiceImpl implements IncidentService { + + /** + * 实时数据事件 + * + * @param coupletMsgData + */ + @Override + public void incident(CoupletMsgData coupletMsgData) { + + log.info("实时数据事件开始....."); + log.info("实时数据事件结束....."); + + } + + /** + * 实时数据事件 + * @return + */ + @Override + public String getName() { + return "real-time-data"; + } +} diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 210211d..0000000 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -com.couplet.analyze.msg.config.RabbitMQConfig diff --git a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml index 2e8d8a1..3b863a6 100644 --- a/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml +++ b/couplet-modules/couplet-analyze/couplet-analyze-msg/src/main/resources/mapper/incident/SysIncidentMapper.xml @@ -6,7 +6,7 @@ - INSERT INTO `vehicle-resolver`.`resolver_report_data` + INSERT INTO `couplet-cloud`.`couplet_msg_data` (`vin`, `create_time`, `longitude`, `latitude`, `speed`, `mileage`, `voltage`, `current`, `resistance`, `gear`, `acceleration_pedal`, `fuel_consumption_rate`, diff --git a/couplet-modules/couplet-system/src/main/resources/bootstrap.yml b/couplet-modules/couplet-system/src/main/resources/bootstrap.yml index 62d5318..aeddeaa 100644 --- a/couplet-modules/couplet-system/src/main/resources/bootstrap.yml +++ b/couplet-modules/couplet-system/src/main/resources/bootstrap.yml @@ -16,11 +16,9 @@ spring: discovery: # 服务注册地址 server-addr: 121.89.211.230:8848 - namespace: 172469 config: # 配置中心地址 server-addr: 121.89.211.230:8848 - namespace: 172469 # 配置文件格式 file-extension: yml # 共享配置