|
|
@@ -1,6 +1,6 @@
|
|
|
package common.utils.jdcloud;
|
|
|
|
|
|
-import com.google.gson.Gson;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.jdcloud.sdk.auth.CredentialsProvider;
|
|
|
import com.jdcloud.sdk.auth.StaticCredentialsProvider;
|
|
|
import com.jdcloud.sdk.http.HttpRequestConfig;
|
|
|
@@ -51,6 +51,9 @@ public class SMS {
|
|
|
params.add(verifyCode);
|
|
|
request.setParams(params);
|
|
|
|
|
|
+ // new Gson().toJson(response)
|
|
|
+ // JSONObject.toJSONString(response)
|
|
|
+ // 以上两种方案都可以
|
|
|
return smsClient.batchSend(request);
|
|
|
}
|
|
|
|
|
|
@@ -92,7 +95,8 @@ public class SMS {
|
|
|
public static void main(String[ ] args) {
|
|
|
// 初始化client
|
|
|
init();
|
|
|
- System.out.println(sendVerifyCodeByMobileNumber("177****####", "3213"));
|
|
|
+ BatchSendResponse response = sendVerifyCodeByMobileNumber("177****####", "3213");
|
|
|
+ System.out.println(JSONObject.toJSONString(response));
|
|
|
/*
|
|
|
// testStatusReport();
|
|
|
// testReply();
|