package com.ycl.controller.text;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.ycl.entity.message.SendReq;
|
import com.ycl.entity.message.SendRes;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.SneakyThrows;
|
import org.springframework.util.Base64Utils;
|
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;
|
|
@RestController()
|
@Api(tags = "测试SMs")
|
@RequestMapping("/text")
|
public class SmsController {
|
|
@PostMapping("/sms_res")
|
@ApiOperation(value = "短信测试")
|
@SneakyThrows
|
public SendRes getSms(@RequestBody String param) {
|
SendRes sendRes = new SendRes();
|
sendRes.setRspcod("success");
|
sendRes.setMgsGroup("SMS123456");
|
sendRes.setSuccess("success");
|
return sendRes;
|
}
|
|
@PostMapping("/sms_res/fail")
|
@ApiOperation(value = "短信测试")
|
@SneakyThrows
|
public SendRes getSmsToFail(@RequestBody String param) {
|
SendRes sendRes = new SendRes();
|
sendRes.setRspcod("InvalidUsrOrPwd");
|
sendRes.setMgsGroup("SMS123456");
|
sendRes.setSuccess("success");
|
return sendRes;
|
}
|
}
|