|
|
@@ -0,0 +1,35 @@
|
|
|
+package com.zhongshu.card.server.core.controller.iotCenter;
|
|
|
+
|
|
|
+import com.zhongshu.card.client.model.mqtt.SendMessageModel;
|
|
|
+import com.zhongshu.card.client.ret.ResultContent;
|
|
|
+import com.zhongshu.card.server.core.service.mqtt.MqttServiceImpl;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import org.apiguardian.api.API;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ *
|
|
|
+ */
|
|
|
+@RequestMapping("/deviceSync")
|
|
|
+@RestController
|
|
|
+@Validated
|
|
|
+@Tag(name = "mqtt测试接口111")
|
|
|
+public class DeviceSyncController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ MqttServiceImpl mqttService;
|
|
|
+
|
|
|
+ @Operation(summary = "发送指令")
|
|
|
+ @RequestMapping(value = "sendMessage", method = {RequestMethod.POST})
|
|
|
+ public ResultContent sendMessage(@RequestBody SendMessageModel param) {
|
|
|
+ return mqttService.sendMessage(param);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|