package com.junmp.jyzb.controller;


import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Create By Spring-2022/10/29
 */
@Controller
@RequestMapping(value = "/mqtt")
@Api(value = "MqttController", tags = {"MQTT 访问控制"})
public class MqttController {
//
//    @Autowired
//    private MqttGateWayService gateWay;
//
//    @RequestMapping(value = "/sendMqttSimple", method = RequestMethod.POST)
//    @ApiOperation("向指定主题中,发送消息")
//    @ResponseBody
//    public ResponseResult sendMqttSimple(@RequestParam(value = "topic", required = true) @ApiParam(value = "MQTT的主题") String topic, String data) {
//        try {
//            gateWay.sendMessageToMqtt(data, topic);
//            return new ResponseResult(99200,"操作成功",data);
//        } catch (Exception e) {
//
//        }
//        return new ResponseResult(99500,"操作失败");
//    }

}
