package com.fos.core.util;

import java.util.HashMap;


import com.cloopen.rest.sdk.CCPRestSDK;

public class SendMessageUtil {

    public static String sendMessage(String telephone,String varifyCode){
        HashMap<String, Object> result = null;

        CCPRestSDK restAPI = new CCPRestSDK();
        
        restAPI.init("sandboxapp.cloopen.com", "8883");// 初始化服务器地址和端口，格式如下，服务器地址不需要写https://
        restAPI.setAccount("8a216da85519f454015524bc42b608c6", "c67bc78987854f20b590b9d5350f8923");// 初始化主帐号和主帐号TOKEN
        restAPI.setAppId("8a216da85519f454015524bc431308cc");// 初始化应用ID
        result = restAPI.sendTemplateSMS(telephone,"98500" ,new String[]{varifyCode,"5"});
        
       String statusCode = (String) result.get("statusCode");
       return statusCode;
       
    }
}
