Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gass-device-report
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
gass-device-report
Commits
1c4a8bff
Commit
1c4a8bff
authored
Dec 28, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备上报缓存修改 gengdidi
parent
53d9af0e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
TCPServerHandler.java
...hong/gassdevicereport/netty/handler/TCPServerHandler.java
+1
-1
UDPServerHandler.java
...hong/gassdevicereport/netty/handler/UDPServerHandler.java
+1
-1
application-prd.yml
src/main/resources/application-prd.yml
+2
-2
No files found.
src/main/java/com/zehong/gassdevicereport/netty/handler/TCPServerHandler.java
View file @
1c4a8bff
...
...
@@ -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
(),
tDevic
eReportData
);
redisUtil
.
set
(
Constant
.
DEVICE_REDIS_KEY
+
reciveReportData
.
getDeviceCode
(),
reciv
eReportData
);
//设备上报数据入库
itDeviceReportDataService
.
insertTDeviceReportData
(
tDeviceReportData
);
...
...
src/main/java/com/zehong/gassdevicereport/netty/handler/UDPServerHandler.java
View file @
1c4a8bff
...
...
@@ -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
(),
tDevic
eReportData
);
redisUtil
.
set
(
Constant
.
DEVICE_REDIS_KEY
+
reciveReportData
.
getDeviceCode
(),
reciv
eReportData
);
//设备上报数据入库
itDeviceReportDataService
.
insertTDeviceReportData
(
tDeviceReportData
);
}
...
...
src/main/resources/application-prd.yml
View file @
1c4a8bff
...
...
@@ -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
# 数据库索引
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment