童刚
2022-08-09 0707dc0f7ea1d37712df1614627538684474b623
提交 | 用户 | age
6de4e8 1 package com.hz.sms.feign;
2
3 import com.hx.resultTool.Result;
4 import com.hz.sms.dto.ResponsesSendMessage;
8dc491 5 import com.hz.sms.dto.ResponsesWxSendMpDto;
0707dc 6
6de4e8 7 import com.hz.sms.dto.TemplateMessageDto;
8 import org.springframework.cloud.openfeign.FeignClient;
9 import org.springframework.web.bind.annotation.PostMapping;
10 import org.springframework.web.bind.annotation.RequestBody;
8dc491 11 import org.springframework.web.bind.annotation.RequestMapping;
6de4e8 12
13 /**
14  * 这里这个name 需要填写 请求的服务提供者的注册到nacos Server上面的服务名,path 是请求接口前缀
15  */
15cbf8 16 @FeignClient(name="phi-sms-user",path = "/sms",contextId = "sys-send")
17 public interface FWXSendService {
6de4e8 18
19     /**
20      * 发送企业微信应用消息
21      * @param templateMessageDto
22      * @return
23      */
24     @PostMapping(value = "/application/message")
25     Result sendNoticeSms(@RequestBody TemplateMessageDto templateMessageDto);
26
27     /**
15cbf8 28      * 微信小程序下发统一消息   (废除)
6de4e8 29      * @param responsesSendMessage
30      * @return
31      */
32     @PostMapping(value = "/applet/message")
33     Result sendAppletMessage(@RequestBody ResponsesSendMessage responsesSendMessage);
34
35     /**
36      * 微信公众号下发统一消息
37      * @param responsesSendMessage
38      * @return
39      */
8dc491 40     @PostMapping(value = "/wechat/message")
41     Result sendWeChatMessage(@RequestBody ResponsesSendMessage responsesSendMessage);
6de4e8 42
8dc491 43     /**
44      *  微信小程序发送订阅消息
45      * @param responsesWxSendMpDto
46      * @return
47      */
48     @RequestMapping(value = "/mp/subscribe/message")
49     Result sendMpMessage(@RequestBody ResponsesWxSendMpDto responsesWxSendMpDto);
6de4e8 50 }