package com.ruoyi.web.controller.tool;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Data
@Slf4j
public class SMSUtil {

    /**
     * 最新发送短信工具
     *
     * @param content
     * @param phone
     */
    public void sendMessage(String content, String phone) {
        MessageService messageService = new MessageService();
        MessageServiceSoap messageServiceSoap = messageService.getMessageServiceSoap();
        int result = messageServiceSoap.sendMessage(phone, content);
        log.info("手机号：{}，内容：{}，短信返回码：{}", phone, content, result);
    }

}
