提交 | 用户 | age
|
6dde8c
|
1 |
package com.hz.sms.feign; |
童 |
2 |
|
|
3 |
import com.hx.resultTool.Result; |
|
4 |
import com.hz.sms.dto.TemplateMessageDto; |
|
5 |
import org.springframework.cloud.openfeign.FeignClient; |
|
6 |
import org.springframework.web.bind.annotation.PostMapping; |
|
7 |
import org.springframework.web.bind.annotation.RequestBody; |
|
8 |
|
|
9 |
/** |
|
10 |
* 这里这个name 需要填写 请求的服务提供者的注册到nacos Server上面的服务名,path 是请求接口前缀 |
|
11 |
*/ |
|
12 |
@FeignClient(name="phi-sms-user",path = "/sms",contextId = "send-corpwx") |
|
13 |
public interface FCorpWXSendService { |
|
14 |
|
|
15 |
/** |
|
16 |
* 发送企业微信应用消息 |
|
17 |
* @param templateMessageDto |
|
18 |
* @return |
|
19 |
*/ |
|
20 |
@PostMapping(value = "/corp-wx-send/application/message") |
|
21 |
Result sendNoticeSms(@RequestBody TemplateMessageDto templateMessageDto); |
|
22 |
} |