package com.app.feign;

import com.app.feign.dto.BotMsg;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 功能描述：
 * 群机器人配置说明：https://work.weixin.qq.com/api/doc/90000/90136/91770
 */
@FeignClient(
        name = "WeChatWorkFeign",
        url = "https://qyapi.weixin.qq.com/cgi-bin/webhook"
)
public interface WeChatWorkFeign {

    @PostMapping(value = "/send?key={key}")
    WeChatWorkResponse send(@RequestBody BotMsg botMsg, @RequestParam("key") String key);

}
