package com.ruoyi.system.utils;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class MobileSMS {
    public void getcode(String phone,String code){
        String url = "http://rest.esms.vn/MainService.svc/json/SendMultipleMessage_V4_get?" +
                "Brandname=CITYEXPRESS" +
                "&Phone=" + phone +
                "&Content=CITYEXPRESS thong bao ma xac thuc OTP la " + code + " qua App CTE. Luu y: Ma OTP se het han trong vong 3 phut. KHONG chia se ma OTP voi nguoi khac." +
                "&ApiKey=8E7C9BBB6DA676D66A20503831BB82" +
                "&SecretKey=23BDA7AF32E14EA1D4031A3A5C2D7A" +
                "&SmsType=2";
        String res="";
        res = HttpUtil.get(url);
//        JSONObject jsonObject =  JSON.parseObject(res);
        System.out.println("发送短信结果："+res);
    }
}
