wlzboy
9 天以前 09faa36132c8cbada5327649875534ef01c1a3b1
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
package com.ruoyi.system.controller;
 
import com.ruoyi.system.service.ISmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
 
@Service
public class SmsSendController {
    @Autowired
    private ISmsService smsService;
 
 
    public String sendSms(SmsSendReq req) {
        if (smsService.sendSms(req.getPhone(), req.getContent())) {
            return "发送成功";
        } else {
            return "发送失败";
        }
    }
}