fuliqi
2024-01-08 e247e6e01f4dda6e536cd822c25467d1b859cb77
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
29
30
31
32
33
34
35
36
37
38
39
40
41
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;
    }
}