Răsfoiți Sursa

add deliver

wangming 5 zile în urmă
părinte
comite
cf4a9fb161

+ 0 - 32
yami-shop-wx/src/main/java/com/yami/shop/wx/service/impl/WxProviderServiceImpl.java

@@ -506,36 +506,4 @@ public class WxProviderServiceImpl implements WxProviderService {
             System.out.println(e.getMessage());
         }
     }
-
-    /**
-     * 查询运单轨迹
-     */
-    public static String queryTrace(String accessToken, String openid, String deliveryId,String waybillId) {
-        String url = "https://api.weixin.qq.com/cgi-bin/express/business/path/get?access_token=" + accessToken;
-        JSONObject requestDataJson = new JSONObject();
-        requestDataJson.put("openid",openid);//用户openid
-        requestDataJson.put("delivery_id",deliveryId);//快递公司ID
-        requestDataJson.put("waybill_id",waybillId);//运单ID
-        log.info("============封装请求参数============" + requestDataJson);
-        try {
-            CloseableHttpClient httpClient = HttpClients.createDefault();
-            HttpPost httpPost = new HttpPost(url);
-            httpPost.addHeader("Content-Type", "application/json");
-            StringEntity requestBody = new StringEntity(requestDataJson.toJSONString(), ContentType.APPLICATION_JSON);
-            httpPost.setEntity(requestBody);
-
-            CloseableHttpResponse response = httpClient.execute(httpPost);
-            HttpEntity responseEntity = response.getEntity();
-            String responseString = EntityUtils.toString(responseEntity,"UTF-8");
-            log.info(responseString);
-            response.close();
-            httpClient.close();
-            return responseString;
-        } catch (IOException e) {
-            System.out.println(e.getMessage());
-        }
-        return null;
-    }
-
-
 }