fix:用户新增默认设置用户类型
parent
3b83b694f8
commit
45641f495c
|
@ -20,7 +20,7 @@ public class Device {
|
||||||
|
|
||||||
protected String productKey;
|
protected String productKey;
|
||||||
|
|
||||||
// private String productSecret ;
|
private String productSecret ;
|
||||||
|
|
||||||
protected String deviceName;
|
protected String deviceName;
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class MessageHandler implements Handler<MqttPublishMessage> {
|
||||||
String productKey = data.get("productKey").toString();
|
String productKey = data.get("productKey").toString();
|
||||||
String deviceName = data.get("deviceName").toString();
|
String deviceName = data.get("deviceName").toString();
|
||||||
if (StringUtils.isBlank(productKey)) {
|
if (StringUtils.isBlank(productKey)) {
|
||||||
deviceOnlineListener.accept(new Device(productKey, deviceName, ""));
|
deviceOnlineListener.accept(new Device(productKey, "",deviceName, ""));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ public class MessageHandler implements Handler<MqttPublishMessage> {
|
||||||
log.info("subscribe topic:{}", subTopic);
|
log.info("subscribe topic:{}", subTopic);
|
||||||
client.subscribe(subTopic, 1, r -> {
|
client.subscribe(subTopic, 1, r -> {
|
||||||
if (deviceOnlineListener != null) {
|
if (deviceOnlineListener != null) {
|
||||||
deviceOnlineListener.accept(new Device(productKey, deviceName, ""));
|
deviceOnlineListener.accept(new Device(productKey,"", deviceName, ""));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue