Pu Zhibing
2024-09-29 adf2ede692b76cf95d0cec80f4087e52d760b219
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/SMSUtil.java
@@ -277,23 +277,24 @@
    /**
     * 短信 : https://sms.mymailcentre.com/smsportal/cellulant
     * 短信 : https://sms.mymailcentre.com
     * API:https://documenter.getpostman.com/view/7705958/Uyr7Hydn
     * @param toPhone
     * @param msg
     * @return
     */
    public boolean sendCellulantMessage(String toPhone, String msg){
        String url = "https://sms.nalosolutions.com/smsbackend/Cell_resl/send-message/";
        String url = "https://sms.nalosolutions.com/smsbackend/Resl_Nalo/send-message/";
        HttpRequest post = HttpUtil.createPost(url);
        post.contentType(ContentType.JSON.toString());
        JSONObject params = new JSONObject();
        params.put("key", "c_x7x5!v_1mhg(l34p05g2b@teheq)ex9mk1jj(u@nlfx_w5(rdx)tb_ttx22b3o");
        params.put("username", "I-GO");
        params.put("password", "abcd1234");
        params.put("password", "9wBolBiXskCuzSf");
        params.put("msisdn", toPhone);
        params.put("message", msg);
        params.put("sender_id", "I-GO");
        params.put("callback_url", "https://igo.i-go.group/user/base/sendCellulantMessageCallback");
        params.put("validity", 1);
        post.body(params.toJSONString());
        System.err.println("短信请求:\n请求地址:" + url + "\n请求参数:" + params.toJSONString());
        HttpResponse execute = post.execute();
@@ -305,11 +306,8 @@
        if(null != status && 1701 == status){
            return true;
        }else{
            System.err.println("短信发送失败:" + jsonObject.toJSONString());
            return false;
        }
    }
    
    public static void main(String[] ages){