Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
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
pseer
gxpt_ht
Commits
5ec2b31b
Commit
5ec2b31b
authored
Feb 06, 2024
by
YG8999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备网关绑定bug处理
parent
fddbea51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
DeviceOpServiceImpl.java
...n/java/share/system/service/impl/DeviceOpServiceImpl.java
+9
-8
No files found.
share-system/src/main/java/share/system/service/impl/DeviceOpServiceImpl.java
View file @
5ec2b31b
...
...
@@ -220,13 +220,13 @@ public class DeviceOpServiceImpl implements DeviceOpService {
* @param devId 网关设备dev_id
* @return
*/
@Override
public
void
clearGatewayDevice
(
String
devId
,
String
userName
)
{
// 获取mqtt的topic、payload
MqttxVo
mqttxVo
=
mqttxService
.
clearGatewayDevice
(
devId
);
mqttxVo
.
setPhone
(
userName
);
// 设置消息队列
this
.
setRedisCache
(
devId
,
mqttxVo
);
// 发送mqtt消息
mqttGatewayComponent
.
sendToMqtt
(
mqttxVo
.
getTopic
(),
0
,
mqttxVo
.
getPayload
());
// 写日志记录
deviceLogService
.
addDeviceLog
(
mqttxVo
,
userName
);
}
/**
...
...
@@ -234,13 +234,14 @@ public class DeviceOpServiceImpl implements DeviceOpService {
* @param devId 网关设备dev_id
* @return
*/
@Override
public
void
addGatewayDevice
(
String
devId
,
String
userName
)
{
// 获取mqtt的topic、payload
MqttxVo
mqttxVo
=
mqttxService
.
addGatewayDevice
(
devId
);
mqttxVo
.
setPhone
(
userName
);
// 设置消息队列
this
.
setRedisCache
(
devId
,
mqttxVo
);
// 发送mqtt消息
mqttGatewayComponent
.
sendToMqtt
(
mqttxVo
.
getTopic
(),
0
,
mqttxVo
.
getPayload
());
// 写日志记录
deviceLogService
.
addDeviceLog
(
mqttxVo
,
userName
);
}
/**
...
...
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