提交 | 用户 | age
|
18b2dc
|
1 |
package com.hz.sms.feign; |
C |
2 |
|
|
3 |
import com.hx.resultTool.Result; |
6de4e8
|
4 |
import com.hz.sms.dto.SmsGeneralSendDto; |
18b2dc
|
5 |
import com.hz.sms.dto.SmsSendDto; |
C |
6 |
import org.springframework.cloud.openfeign.FeignClient; |
|
7 |
import org.springframework.web.bind.annotation.PostMapping; |
|
8 |
import org.springframework.web.bind.annotation.RequestBody; |
6de4e8
|
9 |
import org.springframework.web.bind.annotation.ResponseBody; |
18b2dc
|
10 |
|
C |
11 |
/** |
|
12 |
* 这里这个name 需要填写 请求的服务提供者的注册到nacos Server上面的服务名,path 是请求接口前缀 |
|
13 |
*/ |
|
14 |
@FeignClient(name="phi-sms-user",path = "/sms-u",contextId = "sms-send") |
|
15 |
public interface FSmsSendService { |
|
16 |
|
|
17 |
/** |
|
18 |
* 发送短信 |
|
19 |
* @return Result |
|
20 |
*/ |
|
21 |
@PostMapping(value = "/sms/send") |
|
22 |
Result sendSms(@RequestBody SmsSendDto smsSendDto); |
|
23 |
|
9afdec
|
24 |
/** |
童 |
25 |
* |
|
26 |
* @param smsSendDto |
|
27 |
* @return |
|
28 |
*/ |
|
29 |
@PostMapping(value = "/sms/identicalSend") |
|
30 |
Result sendIdenticalsend(@RequestBody SmsSendDto smsSendDto); |
|
31 |
|
6de4e8
|
32 |
/** |
童 |
33 |
* 发送短信验证码 |
|
34 |
* @param smsGeneralSendDto |
|
35 |
* @return |
|
36 |
*/ |
|
37 |
@PostMapping(value = "/verification/code") |
|
38 |
Result sendVerificationCode(@RequestBody SmsGeneralSendDto smsGeneralSendDto); |
|
39 |
|
|
40 |
/** |
|
41 |
* 发送通知短信 |
|
42 |
* @param smsGeneralSendDto |
|
43 |
* @return |
|
44 |
*/ |
|
45 |
@PostMapping(value = "/inform/sms") |
|
46 |
Result sendNoticeSms(@RequestBody SmsGeneralSendDto smsGeneralSendDto); |
|
47 |
|
|
48 |
/** |
|
49 |
* 发送营销短信 |
|
50 |
* @param smsGeneralSendDto |
|
51 |
* @return |
|
52 |
*/ |
|
53 |
@PostMapping(value = "/marketing/sms") |
|
54 |
Result sendMarketingSend(@RequestBody SmsGeneralSendDto smsGeneralSendDto); |
18b2dc
|
55 |
|
C |
56 |
} |