Browse Source

短信SDK封装完毕

skyfffire 2 tháng trước cách đây
mục cha
commit
f334d14ff3
1 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 3 4
      src/main/java/common/utils/jdcloud/SMS.java

+ 3 - 4
src/main/java/common/utils/jdcloud/SMS.java

@@ -31,7 +31,7 @@ public class SMS {
     /**
      * 发短信
      */
-    public static String sendVerifyCodeByMobileNumber(String mobileNumber, String verifyCode) {
+    public static BatchSendResponse sendVerifyCodeByMobileNumber(String mobileNumber, String verifyCode) {
         if (SMS.smsClient == null) {
             SMS.init();
         }
@@ -50,9 +50,8 @@ public class SMS {
         List<String> params = new ArrayList<>();
         params.add(verifyCode);
         request.setParams(params);
-        BatchSendResponse response = smsClient.batchSend(request);
-        
-        return new Gson().toJson(response);
+
+        return smsClient.batchSend(request);
     }
 
 //    /**