提交 | 用户 | age
|
18b2dc
|
1 |
package com.hz.sms.feign; |
C |
2 |
|
|
3 |
import com.hx.resultTool.Result; |
|
4 |
import com.hz.sms.dto.SmsSendDto; |
|
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-u",contextId = "sms-send") |
|
13 |
public interface FSmsSendService { |
|
14 |
|
|
15 |
/** |
|
16 |
* 发送短信 |
|
17 |
* @return Result |
|
18 |
*/ |
|
19 |
@PostMapping(value = "/sms/send") |
|
20 |
Result sendSms(@RequestBody SmsSendDto smsSendDto); |
|
21 |
|
9afdec
|
22 |
/** |
童 |
23 |
* |
|
24 |
* @param smsSendDto |
|
25 |
* @return |
|
26 |
*/ |
|
27 |
@PostMapping(value = "/sms/identicalSend") |
|
28 |
Result sendIdenticalsend(@RequestBody SmsSendDto smsSendDto); |
|
29 |
|
18b2dc
|
30 |
|
C |
31 |
} |