新增在线发送短信功能
This commit is contained in:
parent
d4050c6a00
commit
db892fa00a
@ -0,0 +1,47 @@
|
||||
package ink.wgink.module.sms.controller.resources.sms;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.sms.pojo.vos.sms.SmsSendVO;
|
||||
import ink.wgink.module.sms.service.sms.ISmsService;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: VerificationCodeController
|
||||
* @Description: 验证码
|
||||
* @Author: WangGeng
|
||||
* @Date: 2020/3/4 7:13 下午
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "短信")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/sms")
|
||||
public class SmsResourceController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private ISmsService smsService;
|
||||
|
||||
@ApiOperation(value = "发送短信", notes = "发送短信接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query", required = true),
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("send")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult send(@RequestBody SmsSendVO smsSendVO) throws Exception {
|
||||
smsService.send(smsSendVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
}
|
@ -14,10 +14,10 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
@ApiModel
|
||||
public class SmsSendVO {
|
||||
|
||||
@ApiModelProperty(name = "userIds", value = "用户ID列表")
|
||||
@ApiModelProperty(name = "userIds", value = "用户ID列表(下划线分割)", required = true)
|
||||
@CheckEmptyAnnotation(name = "用户ID列表")
|
||||
private String userIds;
|
||||
@ApiModelProperty(name = "content", value = "发送内容")
|
||||
@ApiModelProperty(name = "content", value = "发送内容", required = true)
|
||||
@CheckEmptyAnnotation(name = "发送内容")
|
||||
private String content;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user