提交 b799f2cf authored 作者: yangli's avatar yangli

.

上级 e168d095
...@@ -916,7 +916,6 @@ public class MqttServiceImpl implements MqttService, MqttHandler, MqttClientCall ...@@ -916,7 +916,6 @@ public class MqttServiceImpl implements MqttService, MqttHandler, MqttClientCall
log.info("获取到MAC地址:{},{}", mac, allMacAddress); log.info("获取到MAC地址:{},{}", mac, allMacAddress);
// deviceInfo = StrUtil.format(deviceInfo, mac);
Map<String, Object> params = Maps.newHashMap(); Map<String, Object> params = Maps.newHashMap();
params.put("productId", productId); params.put("productId", productId);
...@@ -925,13 +924,15 @@ public class MqttServiceImpl implements MqttService, MqttHandler, MqttClientCall ...@@ -925,13 +924,15 @@ public class MqttServiceImpl implements MqttService, MqttHandler, MqttClientCall
params.put("allMacAddress", allMacAddress); params.put("allMacAddress", allMacAddress);
params.put("clientVersion", clientVersion); params.put("clientVersion", clientVersion);
Map<String, String> map = System.getenv(); /*Map<String, String> map = System.getenv();
String computerName = map.get("COMPUTERNAME");// 获取计算机名 String computerName = map.get("COMPUTERNAME");// 获取计算机名*/
params.put("name", computerName); params.put("name", "测试机器");
// String userName = map.get("USERNAME");// 获取用户名 // String userName = map.get("USERNAME");// 获取用户名
// params.put("name", computerName + "-" + userName); // params.put("name", computerName + "-" + userName);
String remoteDeviceVoJson = HttpUtil.post(gateway + deviceInfo, JSONUtil.toJsonStr(params), 5000); String remoteDeviceVoJson = HttpUtil.post(gateway + deviceInfo, JSONUtil.toJsonStr(params), 5000);
log.info("remoteDeviceVoJson: {}", remoteDeviceVoJson);
RemoteDeviceVoResult remoteDeviceVo = JSONUtil.toBean(remoteDeviceVoJson, RemoteDeviceVoResult.class); RemoteDeviceVoResult remoteDeviceVo = JSONUtil.toBean(remoteDeviceVoJson, RemoteDeviceVoResult.class);
MqttClientSecurityConfiguration mqttClientSecurityConfiguration = new MqttClientSecurityConfiguration(); MqttClientSecurityConfiguration mqttClientSecurityConfiguration = new MqttClientSecurityConfiguration();
mqttClientSecurityConfiguration.setAccessToken(remoteDeviceVo.getData().getSecretKey()); mqttClientSecurityConfiguration.setAccessToken(remoteDeviceVo.getData().getSecretKey());
......
...@@ -2,8 +2,8 @@ apq: ...@@ -2,8 +2,8 @@ apq:
iot-gateway: 39.98.116.19:80/api iot-gateway: 39.98.116.19:80/api
webrtc_path: https://ceshi.priusis.com:8443 webrtc_path: https://ceshi.priusis.com:8443
client: client:
productId: 294 productId: 314
tenantId: 138 tenantId: 261
job: job:
type: all type: all
control: control:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论