Commit 1c4a8bff authored by 耿迪迪's avatar 耿迪迪

设备上报缓存修改 gengdidi

parent 53d9af0e
......@@ -98,7 +98,7 @@ public class TCPServerHandler extends ChannelInboundHandlerAdapter {
reciveReportData.setDeviceType(METER);
reciveReportData.setAlarmType(METER_ALARM);
reciveReportData.setPressure(tDeviceReportData.getPressure());
redisUtil.set(Constant.DEVICE_REDIS_KEY + reciveReportData.getDeviceCode(),tDeviceReportData);
redisUtil.set(Constant.DEVICE_REDIS_KEY + reciveReportData.getDeviceCode(),reciveReportData);
//设备上报数据入库
itDeviceReportDataService.insertTDeviceReportData(tDeviceReportData);
......
......@@ -58,7 +58,7 @@ public class UDPServerHandler extends SimpleChannelInboundHandler<DatagramPacket
reciveReportData.setDeviceType(METER);
reciveReportData.setAlarmType(METER_ALARM);
reciveReportData.setPressure(tDeviceReportData.getPressure());
redisUtil.set(Constant.DEVICE_REDIS_KEY + reciveReportData.getDeviceCode(),tDeviceReportData);
redisUtil.set(Constant.DEVICE_REDIS_KEY + reciveReportData.getDeviceCode(),reciveReportData);
//设备上报数据入库
itDeviceReportDataService.insertTDeviceReportData(tDeviceReportData);
}
......
......@@ -3,12 +3,12 @@ spring:
datasource:
username: root
password: root@123
url: jdbc:mysql://127.0.0.1/gas_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://36.148.23.59:3306/gas_db_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
driver-class-name: com.mysql.jdbc.Driver
# redis 配置
redis:
# 地址
host: 127.0.0.1
host: 36.148.23.59
# 端口,默认为6379
port: 6379
# 数据库索引
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment