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