Commit 5ec2b31b by YG8999

设备网关绑定bug处理

parent fddbea51
...@@ -220,13 +220,13 @@ public class DeviceOpServiceImpl implements DeviceOpService { ...@@ -220,13 +220,13 @@ public class DeviceOpServiceImpl implements DeviceOpService {
* @param devId 网关设备dev_id * @param devId 网关设备dev_id
* @return * @return
*/ */
@Override
public void clearGatewayDevice(String devId, String userName) { public void clearGatewayDevice(String devId, String userName) {
// 获取mqtt的topic、payload // 获取mqtt的topic、payload
MqttxVo mqttxVo = mqttxService.clearGatewayDevice(devId); MqttxVo mqttxVo = mqttxService.clearGatewayDevice(devId);
mqttxVo.setPhone(userName); // 发送mqtt消息
// 设置消息队列 mqttGatewayComponent.sendToMqtt(mqttxVo.getTopic(), 0, mqttxVo.getPayload());
this.setRedisCache(devId, mqttxVo); // 写日志记录
deviceLogService.addDeviceLog(mqttxVo, userName);
} }
/** /**
...@@ -234,13 +234,14 @@ public class DeviceOpServiceImpl implements DeviceOpService { ...@@ -234,13 +234,14 @@ public class DeviceOpServiceImpl implements DeviceOpService {
* @param devId 网关设备dev_id * @param devId 网关设备dev_id
* @return * @return
*/ */
@Override
public void addGatewayDevice(String devId, String userName) { public void addGatewayDevice(String devId, String userName) {
// 获取mqtt的topic、payload // 获取mqtt的topic、payload
MqttxVo mqttxVo = mqttxService.addGatewayDevice(devId); MqttxVo mqttxVo = mqttxService.addGatewayDevice(devId);
mqttxVo.setPhone(userName); // 发送mqtt消息
// 设置消息队列 mqttGatewayComponent.sendToMqtt(mqttxVo.getTopic(), 0, mqttxVo.getPayload());
this.setRedisCache(devId, mqttxVo); // 写日志记录
deviceLogService.addDeviceLog(mqttxVo, userName);
} }
/** /**
......
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