dengzedong
2024-12-16 b82ba2a29aa9ee181c707677157d8057fff68450
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.iailab.module.system.api.sms;
 
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.module.system.api.sms.dto.send.SmsSendSingleToUserReqDTO;
import com.iailab.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
 
import javax.validation.Valid;
 
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 短信发送")
public interface SmsSendApi {
 
    String PREFIX = ApiConstants.PREFIX + "/sms/send";
 
    @PostMapping(PREFIX + "/send-single-admin")
    @Operation(summary = "发送单条短信给 Admin 用户", description = "在 mobile 为空时,使用 userId 加载对应 Admin 的手机号")
    CommonResult<Long> sendSingleSmsToAdmin(@Valid @RequestBody SmsSendSingleToUserReqDTO reqDTO);
 
    @PostMapping(PREFIX + "/send-single-member")
    @Operation(summary = "发送单条短信给 Member 用户", description = "在 mobile 为空时,使用 userId 加载对应 Member 的手机号")
    CommonResult<Long> sendSingleSmsToMember(@Valid @RequestBody SmsSendSingleToUserReqDTO reqDTO);
 
}