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 "发送失败"; } } }