Parcourir la source

查询使用卫生间信息

chejianzheng il y a 3 mois
Parent
commit
1dd77a9a98
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9 0
      src/main/java/com/wxxcx/index/WxxcxIndexController.java

+ 9 - 0
src/main/java/com/wxxcx/index/WxxcxIndexController.java

@@ -1109,6 +1109,15 @@ public class WxxcxIndexController<AesException extends Throwable> {
             e.printStackTrace();
             r = JSONUtil.getErrorMsg(e);
         }
+
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("dev_id", dev_id);
+        try {
+            MqttUtil.pub("/ops/update_furnitures", jsonObject.toJSONString());
+            System.out.println("发送topic/ops/update_furnitures, param = " +jsonObject.toJSONString() + " 成功");
+        } catch (Exception e) {
+            r = JSONUtil.getErrorMsg(e);
+        }
         return r;
     }