获取有效订单数 api更换
This commit is contained in:
parent
8b27b5c7b3
commit
cd05cd4cd8
|
@ -284,19 +284,23 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
|
|
||||||
CloseableHttpClient httpClient = proxyHttpClient();
|
CloseableHttpClient httpClient = proxyHttpClient();
|
||||||
String wmPoiId = valueFromCookie("wmPoiId", storeInfo.getStoreCookie());
|
String wmPoiId = valueFromCookie("wmPoiId", storeInfo.getStoreCookie());
|
||||||
String url = "https://waimaieapp.meituan.com/gw/bizdata/marketing/single/analysis";
|
String url = "https://waimaieapp.meituan.com/gw/bizdata/single/business/overview";
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
// params.put("ignoreSetRouterProxy", true);
|
// params.put("ignoreSetRouterProxy", true);
|
||||||
// params.put("acctId", valueFromCookie("acctId", storeInfo.getStoreCookie()));
|
params.put("acctId", valueFromCookie("acctId", storeInfo.getStoreCookie()));
|
||||||
params.put("wmPoiId", wmPoiId);
|
params.put("wmPoiId", wmPoiId);
|
||||||
params.put("token", valueFromCookie("token", storeInfo.getStoreCookie()));
|
params.put("token", valueFromCookie("token", storeInfo.getStoreCookie()));
|
||||||
params.put("appType", 3);
|
params.put("appType", 3);
|
||||||
String date = LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
String date = LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||||
params.put("beginDate", date);
|
params.put("beginDate", date);
|
||||||
params.put("endDate", date);
|
params.put("endDate", date);
|
||||||
|
params.put("compareType",0);
|
||||||
|
params.put("durationType",1);
|
||||||
url = appendParams(url, params);
|
url = appendParams(url, params);
|
||||||
HttpGet request = new HttpGet(url);
|
HttpGet request = new HttpGet(url);
|
||||||
request.setHeader("Cookie",storeInfo.getStoreCookie());
|
request.setHeader("Cookie",storeInfo.getStoreCookie());
|
||||||
|
request.setHeader("Host","waimaieapp.meituan.com");
|
||||||
|
request.setHeader("User-Agent","Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36");
|
||||||
String result = null;
|
String result = null;
|
||||||
try {
|
try {
|
||||||
result = EntityUtils.toString(httpClient.execute(request).getEntity());
|
result = EntityUtils.toString(httpClient.execute(request).getEntity());
|
||||||
|
@ -309,7 +313,7 @@ public class MeituanServiceImpl implements IMeituanService {
|
||||||
String code = jsonObject.getString("code");
|
String code = jsonObject.getString("code");
|
||||||
if ("0".equals(code)) {
|
if ("0".equals(code)) {
|
||||||
JSONArray array = jsonObject.getJSONArray("data");
|
JSONArray array = jsonObject.getJSONArray("data");
|
||||||
JSONObject one = array.getJSONObject(0);
|
JSONObject one = array.getJSONObject(3);
|
||||||
String total = one.getString("base");
|
String total = one.getString("base");
|
||||||
System.out.println(total);
|
System.out.println(total);
|
||||||
BusStoreInfo store = new BusStoreInfo();
|
BusStoreInfo store = new BusStoreInfo();
|
||||||
|
|
Loading…
Reference in New Issue