| | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.lang.reflect.Type; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | import java.util.*; |
| | | |
| | | import org.apache.commons.httpclient.HttpClient; |
| | | import org.apache.commons.httpclient.HttpException; |
| | |
| | | |
| | | private final static String appKey = "f9e7f22f"; |
| | | private final static String appSecret = "9B2291352497FAF42B2DF44BFCF62316"; |
| | | |
| | | //是否采用订单侠转链 |
| | | private final static boolean CONVERT_DINGDANXIA = true; |
| | | |
| | | /** |
| | | * 获取签名 |
| | |
| | | * @param goodsId |
| | | */ |
| | | public static VIPConvertResultDTO convertLink(String goodsId, String tag) { |
| | | |
| | | if (CONVERT_DINGDANXIA) { |
| | | return DingDanXiaApiUtil.convertLink(goodsId, tag); |
| | | } |
| | | |
| | | JSONObject taskParams = new JSONObject(); |
| | | JSONArray goodsIdArray = new JSONArray(); |
| | | goodsIdArray.add(goodsId); |
| | |
| | | |
| | | |
| | | public static VIPConvertResultDTO convertLinkByUrl(String url, String tag) { |
| | | |
| | | if (CONVERT_DINGDANXIA) { |
| | | return DingDanXiaApiUtil.convertLinkByUrl(url, tag); |
| | | } |
| | | JSONObject taskParams = new JSONObject(); |
| | | JSONArray urlArray = new JSONArray(); |
| | | urlArray.add(url); |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | convertLinkByUrl("https://t.vip.com/T7RyKKCJLj9", "437032"); |
| | | // convertLinkByUrl("https://t.vip.com/T7RyKKCJLj9", "437032"); |
| | | // convertLink("560392904","437032"); |
| | | getOrderList(VipShopOrderQueryModel.createOrderSn(Arrays.asList(new String[]{"23090254293903"}),1)); |
| | | } |
| | | |
| | | } |