|  |  | 
 |  |  | package com.xcong.excoin; | 
 |  |  |  | 
 |  |  | import cn.hutool.core.date.DatePattern; | 
 |  |  | import cn.hutool.core.date.DateUtil; | 
 |  |  | import cn.hutool.core.text.UnicodeUtil; | 
 |  |  | import cn.hutool.core.util.XmlUtil; | 
 |  |  | import cn.hutool.http.HttpUtil; | 
 |  |  | import org.junit.jupiter.api.Test; | 
 |  |  | import org.springframework.boot.test.context.SpringBootTest; | 
 |  |  |  | 
 |  |  | import java.util.Date; | 
 |  |  | import java.util.HashMap; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @author wzy | 
 |  |  | 
 |  |  | @SpringBootTest | 
 |  |  | public class SmsTest { | 
 |  |  |  | 
 |  |  |     public static void main(String[] args) { | 
 |  |  |         String url = "http://www.qf106.com/sms.aspx"; | 
 |  |  |         HashMap<String,Object> param = new HashMap<>(); | 
 |  |  |         param.put("userid", "16580"); | 
 |  |  |         param.put("account", "Biue"); | 
 |  |  |         param.put("password", "123456"); | 
 |  |  |         param.put("mobile", "15773002834"); | 
 |  |  |         param.put("content", "这是测试"); | 
 |  |  |         param.put("sendTime", DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN)); | 
 |  |  |         param.put("action", "send"); | 
 |  |  |         param.put("checkcontent", 0); | 
 |  |  |         param.put("taskName", "验证码"); | 
 |  |  |         param.put("countnumber", 1); | 
 |  |  |         param.put("mobilenumber", 1); | 
 |  |  |         param.put("telephonenumber", 0); | 
 |  |  |  | 
 |  |  |         String response = HttpUtil.post(url, param); | 
 |  |  |         System.out.println(response); | 
 |  |  |         System.out.println(XmlUtil.xmlToMap(response).get("returnstatus")); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } |