All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openea.eap.module.system.api.sms.SmsCodeApi Maven / Gradle / Ivy

The newest version!
package org.openea.eap.module.system.api.sms;

import org.openea.eap.framework.common.pojo.CommonResult;
import org.openea.eap.module.system.api.sms.dto.code.SmsCodeValidateReqDTO;
import org.openea.eap.module.system.api.sms.dto.code.SmsCodeSendReqDTO;
import org.openea.eap.module.system.api.sms.dto.code.SmsCodeUseReqDTO;
import org.openea.eap.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.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
@Tag(name = "RPC 服务 - 短信验证码")
public interface SmsCodeApi {

    String PREFIX = ApiConstants.PREFIX + "/oauth2/sms/code";

    @PostMapping(PREFIX + "/send")
    @Operation(summary = "创建短信验证码,并进行发送")
    CommonResult sendSmsCode(@Valid @RequestBody SmsCodeSendReqDTO reqDTO);

    @PutMapping(PREFIX + "/use")
    @Operation(summary = "验证短信验证码,并进行使用")
    CommonResult useSmsCode(@Valid @RequestBody SmsCodeUseReqDTO reqDTO);

    @GetMapping(PREFIX + "/validate")
    @Operation(summary = "检查验证码是否有效")
    CommonResult validateSmsCode(@Valid @RequestBody SmsCodeValidateReqDTO reqDTO);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy