package com.fuyuanshen.global.mqtt.publish;

import cn.dev33.satoken.annotation.SaIgnore;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
@SaIgnore
@Slf4j
public class DeviceDataController {

    @Autowired
    private MqttClientTest mqttClientTest;
    @GetMapping("/command")
    public ResponseEntity<String> sendCommand() {

        mqttClientTest.sendMsg();
        return ResponseEntity.ok("success");
    }
}