package com.ccg.util; import java.io.IOException; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper; import com.ccg.vo.KuaidiInfo; import com.ccg.vo.KuaidiSource; public class Kuaidi100Util { /** * 直接获取单号来源实体 * @author CCG 2016年6月16日 * @param text 单号 * @return * @throws IOException * @throws JsonMappingException * @throws JsonParseException */ public static KuaidiSource getKuaidiSource(String text) throws JsonParseException, JsonMappingException, IOException{ String url = "http://www.kuaidi100.com/autonumber/autoComNum?text="+text; String res = HttpUtil.sendGet(url, "utf-8"); ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(res, KuaidiSource.class); } /** * 获取运单信息 * @author CCG 2016年6月16日 * @param type * @param postId * @return 运单对象 * @throws IOException * @throws JsonMappingException * @throws JsonParseException */ public static KuaidiInfo getKuaidiInfo(String type,String postId) throws JsonParseException, JsonMappingException, IOException{ double temp = Math.random(); String url = "http://www.kuaidi100.com/query?type="+type+"&postid="+postId + "&id=1&valicode=&temp="+temp; //0.6873234723477222 String res = HttpUtil.sendGet(url, "utf-8"); ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(res, KuaidiInfo.class); } }

王国从 LV1
2023年5月19日
1143011510 LV15
2021年11月26日
一个好人520 LV10
2021年9月29日
zcl8829 LV1
2021年9月24日
adminqujie LV10
2019年12月26日
qq776276461 LV4
2019年9月11日
130666 LV2
2019年6月18日
ce1119 LV1
2019年4月10日
csy1209457788 LV3
2019年2月23日
matintalorr LV10
2019年1月30日