fix:用户新增默认设置用户类型

V0.5.x
tangfudong 2023-06-28 10:08:41 +08:00
parent 3b83b694f8
commit 45641f495c
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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, ""));
} }
}); });
} }