Commit 5ec2b31b by YG8999

设备网关绑定bug处理

parent fddbea51
......@@ -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);
}
/**
......
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