提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.api.sms; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.CommonResult; |
|
4 |
import com.iailab.module.system.api.sms.dto.code.SmsCodeValidateReqDTO; |
|
5 |
import com.iailab.module.system.api.sms.dto.code.SmsCodeSendReqDTO; |
|
6 |
import com.iailab.module.system.api.sms.dto.code.SmsCodeUseReqDTO; |
|
7 |
import com.iailab.module.system.enums.ApiConstants; |
|
8 |
import io.swagger.v3.oas.annotations.tags.Tag; |
|
9 |
import io.swagger.v3.oas.annotations.Operation; |
|
10 |
import org.springframework.cloud.openfeign.FeignClient; |
|
11 |
import org.springframework.web.bind.annotation.GetMapping; |
|
12 |
import org.springframework.web.bind.annotation.PostMapping; |
|
13 |
import org.springframework.web.bind.annotation.PutMapping; |
|
14 |
import org.springframework.web.bind.annotation.RequestBody; |
|
15 |
|
|
16 |
import javax.validation.Valid; |
|
17 |
|
1ecdfb
|
18 |
@FeignClient(name = ApiConstants.NAME) |
e7c126
|
19 |
@Tag(name = "RPC 服务 - 短信验证码") |
H |
20 |
public interface SmsCodeApi { |
|
21 |
|
|
22 |
String PREFIX = ApiConstants.PREFIX + "/oauth2/sms/code"; |
|
23 |
|
|
24 |
@PostMapping(PREFIX + "/send") |
|
25 |
@Operation(summary = "创建短信验证码,并进行发送") |
|
26 |
CommonResult<Boolean> sendSmsCode(@Valid @RequestBody SmsCodeSendReqDTO reqDTO); |
|
27 |
|
|
28 |
@PutMapping(PREFIX + "/use") |
|
29 |
@Operation(summary = "验证短信验证码,并进行使用") |
|
30 |
CommonResult<Boolean> useSmsCode(@Valid @RequestBody SmsCodeUseReqDTO reqDTO); |
|
31 |
|
|
32 |
@GetMapping(PREFIX + "/validate") |
|
33 |
@Operation(summary = "检查验证码是否有效") |
|
34 |
CommonResult<Boolean> validateSmsCode(@Valid @RequestBody SmsCodeValidateReqDTO reqDTO); |
|
35 |
|
|
36 |
} |