zhouliwu 1 år sedan
förälder
incheckning
0d4d0a83a6

+ 1
- 13
frame-module-admin/src/main/java/com/bohuikeji/frame/module/admin/utils/YiXunGmsUtils.java Visa fil

43
     private static final String MO_URL = "https://nsms.51yixun.com/sms/mo";
43
     private static final String MO_URL = "https://nsms.51yixun.com/sms/mo";
44
 
44
 
45
 
45
 
46
-    /*public static String SEND_URL="http://sms.51yixun.com:8200/sms/send";
47
-
48
-    public static String REPORT_URL="http://sms.51yixun.com:8200/sms/report";
49
-
50
-    public static String PRICE_URL="http://sms.51yixun.com:8200/sms/balance";
51
-
52
-    public static String MO_URL="http://sms.51yixun.com:8200/sms/mo";*/
53
 
46
 
54
     /**
47
     /**
55
      * 短信验证码
48
      * 短信验证码
167
         }
160
         }
168
         Map<String,String> reqParams=getPublicParamsn("SMS_184115918".equals(templateCode));
161
         Map<String,String> reqParams=getPublicParamsn("SMS_184115918".equals(templateCode));
169
         reqParams.put(phone, content);
162
         reqParams.put(phone, content);
170
-        String resStr= null;
171
-        try {
172
-            resStr = HttpUtil.doHttpPost(SEND_URL, reqParams);
173
-        } catch (IOException e) {
174
-            e.printStackTrace();
175
-        }
163
+        String resStr= HttpRequest.get(SEND_URL).query(reqParams).send().contentType("application/json","utf-8").bodyText();
176
         JSONObject res=JSON.parseObject(resStr);
164
         JSONObject res=JSON.parseObject(resStr);
177
         log.error("【短信发送失败】1号码:{},发送内容:{},返回信息:{}",phone,content,res);
165
         log.error("【短信发送失败】1号码:{},发送内容:{},返回信息:{}",phone,content,res);
178
         if("SUCCESS".equals(res.getString("code"))){
166
         if("SUCCESS".equals(res.getString("code"))){

Laddar…
Avbryt
Spara