package com.seer.teach.mp.api;

import com.seer.teach.mp.api.dto.MpSendMessageDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = ApiConstants.SERVER_NAME, contextId = "mpMessageServiceApi", path = "/seer/mp")
public interface MpMessageServiceApi {

    /**
     * 获取用户列表
     * @param businessSceneCode 业务场景编码
     * @return 用户列表
     */
    @GetMapping("/internal/getUserForMessageByBusinessSceneCode")
    List<Integer> getGroupUserIdForMessageByBusinessSceneCode(@RequestParam("businessSceneCode") String businessSceneCode);

    /**
     * 发送消息
     * @param mpSendMessageDTO 消息数据
     * @return 是否发送成功
     */
    @PostMapping("/internal/sendMessage")
    boolean sendMessage(@RequestBody MpSendMessageDTO mpSendMessageDTO);
}