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

.

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