package com.zhongshu.card.server.core.controller.feign;

import com.zhongshu.card.client.model.mqtt.SendMessageModel;
import com.zhongshu.card.client.model.org.*;
import com.github.microservice.net.ResultContent;
import com.zhongshu.card.server.core.service.mqtt.MqttServiceImpl;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author TRX
 * @date 2024/7/23
 */
@RestController
@RequestMapping("mqttFeign")
@Tag(name = "消息服务")
@Hidden
public class MqttFeignController {

    @Autowired
    MqttServiceImpl mqttService;

    @Operation(summary = "发送mqtt信息", description = "发送mqtt信息")
    @RequestMapping(value = "manager/sendMessage", method = {RequestMethod.POST})
    public ResultContent<OrganizationUserModel> sendMessage(@RequestBody SendMessageModel param) {
        return mqttService.sendMessage(param);
    }

}
