Compare commits

...

2 Commits

Author SHA1 Message Date
lijiayao ab079c7daf Merge remote-tracking branch 'origin/server_five' into server_five 2024-04-04 08:58:50 +08:00
lijiayao ad5626f0af refactor: 修改框架 2024-04-04 08:58:43 +08:00
9 changed files with 118 additions and 113 deletions

View File

@ -17,11 +17,9 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -15,11 +15,9 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -108,7 +108,7 @@ public class ModelMessage {
}); });
mqttClient.subscribe("test",0); mqttClient.subscribe("test",0);
Thread.sleep(1000*60*10); Thread.sleep(1000*6*10);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }

View File

@ -1,38 +1,38 @@
//package com.couplet.analyze.msg.service.impl; package com.couplet.analyze.msg.service.impl;
//
//import com.couplet.analyze.msg.domain.CoupletMsgData; import com.couplet.analyze.msg.domain.CoupletMsgData;
//import com.couplet.analyze.msg.service.IncidentService; import com.couplet.analyze.msg.service.IncidentService;
//import com.couplet.common.log.annotation.Log; import com.couplet.common.log.annotation.Log;
//import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
//import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
//
///** /**
// * @Author: LiJiaYao * @Author: LiJiaYao
// * @Date: 2024/4/2 * @Date: 2024/4/2
// * @Description: 故障事件 * @Description:
// */ */
//@Service("breakdown") @Service("breakdown")
//@Log4j2 @Log4j2
//public class BreakdownServiceImpl implements IncidentService { public class BreakdownServiceImpl implements IncidentService {
// /** /**
// * 故障事件 *
// * *
// * @param coupletMsgData * @param coupletMsgData
// */ */
// @Override @Override
// public void incident(CoupletMsgData coupletMsgData) { public void incident(CoupletMsgData coupletMsgData) {
//
// log.info("故障事件开始....."); log.info("故障事件开始.....");
// log.info("故障事件结束....."); log.info("故障事件结束.....");
//
//
// } }
//
// /** /**
// * @return 获取事件名称 * @return
// */ */
// @Override @Override
// public String getName() { public String getName() {
// return "breakdown"; return "breakdown";
// } }
//} }

View File

@ -1,33 +1,40 @@
//package com.couplet.analyze.msg.service.impl; package com.couplet.analyze.msg.service.impl;
//
//import com.couplet.analyze.msg.domain.CoupletMsgData; import com.couplet.analyze.msg.domain.CoupletMsgData;
//import com.couplet.analyze.msg.service.IncidentService; import com.couplet.analyze.msg.service.IncidentService;
//import org.springframework.stereotype.Service; import lombok.extern.log4j.Log4j2;
// import org.springframework.stereotype.Service;
///**
// * @Author: LiJiaYao /**
// * @Date: 2024/4/2 * @Author: LiJiaYao
// * @Description: 电子围栏事件服务实现类 * @Date: 2024/4/2
// */ * @Description:
//@Service("electronic-fence") */
//public class ElectronicFenceServiceImpl implements IncidentService { @Service("electronic-fence")
// @Log4j2
// public class ElectronicFenceServiceImpl implements IncidentService {
// /**
// * 电子围栏事件
// * /**
// * @param coupletMsgData *
// */ *
// @Override * @param coupletMsgData
// public void incident(CoupletMsgData coupletMsgData) { */
// @Override
// } public void incident(CoupletMsgData coupletMsgData) {
//
// /** log.info("电子围栏事件开始.......");
// * @return 电子围栏service 名称 log.info("电子围栏事件结束.......");
// */
// @Override
// public String getName() {
// return "electronic-fence"; }
// }
//} /**
* @return service
*/
@Override
public String getName() {
return "electronic-fence";
}
}

View File

@ -1,33 +1,38 @@
//package com.couplet.analyze.msg.service.impl; package com.couplet.analyze.msg.service.impl;
//
//import com.couplet.analyze.msg.domain.CoupletMsgData; import com.couplet.analyze.msg.domain.CoupletMsgData;
//import com.couplet.analyze.msg.service.IncidentService; import com.couplet.analyze.msg.service.IncidentService;
//import org.springframework.stereotype.Service; import lombok.extern.log4j.Log4j2;
// import org.springframework.stereotype.Service;
///**
// * @Author: LiJiaYao /**
// * @Date: 2024/4/2 * @Author: LiJiaYao
// * @Description: 实时数据事件 * @Date: 2024/4/2
// */ * @Description:
//@Service("real-time-data") */
//public class RealTimeDataServiceImpl implements IncidentService { @Service("real-time-data")
// @Log4j2
// /** public class RealTimeDataServiceImpl implements IncidentService {
// * 实时数据事件
// * /**
// * @param coupletMsgData *
// */ *
// @Override * @param coupletMsgData
// public void incident(CoupletMsgData coupletMsgData) { */
// @Override
// } public void incident(CoupletMsgData coupletMsgData) {
//
// /** log.info("实时数据事件开始.....");
// * 实时数据事件 log.info("实时数据事件结束.....");
// * @return
// */ }
// @Override
// public String getName() { /**
// return "real-time-data"; *
// } * @return
//} */
@Override
public String getName() {
return "real-time-data";
}
}

View File

@ -6,7 +6,7 @@
<insert id="reportMapper"> <insert id="reportMapper">
INSERT INTO `vehicle-resolver`.`resolver_report_data` INSERT INTO `couplet-cloud`.`couplet_msg_data`
(`vin`, `create_time`, `longitude`, `latitude`, (`vin`, `create_time`, `longitude`, `latitude`,
`speed`, `mileage`, `voltage`, `current`, `resistance`, `gear`, `speed`, `mileage`, `voltage`, `current`, `resistance`, `gear`,
`acceleration_pedal`, `fuel_consumption_rate`, `acceleration_pedal`, `fuel_consumption_rate`,

View File

@ -16,11 +16,9 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置