Browse Source

首页大屏统计

chejianzheng 1 month ago
parent
commit
d769a3cfe6

+ 3 - 0
portal-service-infrastructure/src/main/java/com/hfln/portal/infrastructure/mqtt/MqttSubHandle.java

@@ -155,10 +155,13 @@ public class MqttSubHandle {
         JSONObject obj = JSONObject.parseObject(payload);
         String deviceInfoStr = obj.getString("device_info");
         JSONObject deviceInfo = JSONObject.parseObject(deviceInfoStr);
+
         String software = deviceInfo.getString("firmware");
         dev.setSoftware(software);
         int indicatorLed = obj.getIntValue("indicator_led");
         dev.setStatusLight(indicatorLed == 0 ? 1 : 0);
+        int isCeiling = obj.getIntValue("isCeiling");
+        dev.setMountPlain(isCeiling == 1 ? DevInfo.Constants.MountPlain.CEILING : DevInfo.Constants.MountPlain.WALL);
 
         devInfoService.updateById(dev);
     }