|
@@ -95,102 +95,9 @@ public class KuaishouOrderLIstGetJob {
|
|
System.err.println(days);
|
|
System.err.println(days);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * 快分销-11、12月所有数据
|
|
|
|
- **/
|
|
|
|
- @XxlJob("allOrderGet")
|
|
|
|
- public void allOrderGet() throws Exception {
|
|
|
|
- log.info("-------------------------获取快分销订单上个月数据开始数据开始--------------------------");
|
|
|
|
- // List<String> dateList = new ArrayList<>();
|
|
|
|
- String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
|
- String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -93);
|
|
|
|
- String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -2);
|
|
|
|
- List<String> days = DateUtils.getDays(startDate, endDate);
|
|
|
|
-
|
|
|
|
- List<JSONObject> cookies = ikuaishouSupplyChainService.getCookie();
|
|
|
|
- if (Check.isNull(cookies)) {
|
|
|
|
- log.error("cookie数据为空");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- JSONArray hourList = KuaishouHourEnum.getHourList();
|
|
|
|
- JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
|
|
|
|
- for (int z = 0; z < days.size(); z++) {
|
|
|
|
- String date = days.get(z);
|
|
|
|
- for (int i = 0; i < hourList.size(); i++) {
|
|
|
|
- String hour = hourList.getString(i);
|
|
|
|
- for (int j = 0; j < minSecList.size(); j++) {
|
|
|
|
- JSONObject minSecJson = minSecList.getJSONObject(j);
|
|
|
|
- String startTime = minSecJson.getString("startTime");
|
|
|
|
- String endTime = minSecJson.getString("endTime");
|
|
|
|
- String start = date + hour + startTime;
|
|
|
|
- String end = date + hour + endTime;
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
- Long orderCreateTimeStart = sdf.parse(start).getTime();
|
|
|
|
- Long orderCreateTimeEnd = sdf.parse(end).getTime();
|
|
|
|
- for (int p = 0; p < cookies.size(); p++) {
|
|
|
|
- JSONObject cookieJson = cookies.get(p);
|
|
|
|
- String cookie = cookieJson.getString("cookie");
|
|
|
|
- ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
|
|
|
|
|
|
|
|
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
|
|
- /**
|
|
|
|
- * 快分销-当前月所有数据
|
|
|
|
- **/
|
|
|
|
- @XxlJob("nowMonthyOrderGet")
|
|
|
|
- public void nowMonthyOrderGet() throws Exception {
|
|
|
|
- log.info("-------------------------获取快分销订单当前月数据开始数据开始--------------------------");
|
|
|
|
- List<JSONObject> cookies = ikuaishouSupplyChainService.getCookie();
|
|
|
|
- if (Check.isNull(cookies)) {
|
|
|
|
- log.error("cookie数据为空");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
|
- String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -3);
|
|
|
|
- String monthFirstDay = DateUtils.getMonthFirstDay();
|
|
|
|
- List<String> days = DateUtils.getDays(monthFirstDay, endDate);
|
|
|
|
- JSONArray hourList = KuaishouHourEnum.getHourList();
|
|
|
|
- JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
|
|
|
|
- for (int z = 0; z < days.size(); z++) {
|
|
|
|
- String date = days.get(z);
|
|
|
|
- for (int i = 0; i < hourList.size(); i++) {
|
|
|
|
- String hour = hourList.getString(i);
|
|
|
|
- for (int j = 0; j < minSecList.size(); j++) {
|
|
|
|
- JSONObject minSecJson = minSecList.getJSONObject(j);
|
|
|
|
- String startTime = minSecJson.getString("startTime");
|
|
|
|
- String endTime = minSecJson.getString("endTime");
|
|
|
|
- String start = date + hour + startTime;
|
|
|
|
- String end = date + hour + endTime;
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
- Long orderCreateTimeStart = sdf.parse(start).getTime();
|
|
|
|
- Long orderCreateTimeEnd = sdf.parse(end).getTime();
|
|
|
|
- for (int p = 0; p < cookies.size(); p++) {
|
|
|
|
- JSONObject cookieJson = cookies.get(p);
|
|
|
|
- String cookie = cookieJson.getString("cookie");
|
|
|
|
- fxNowService.submit(new Runnable() {
|
|
|
|
- @Override
|
|
|
|
- public void run() {
|
|
|
|
- try {
|
|
|
|
- ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -224,7 +131,8 @@ public class KuaishouOrderLIstGetJob {
|
|
for (int p = 0; p < cookies.size(); p++) {
|
|
for (int p = 0; p < cookies.size(); p++) {
|
|
JSONObject cookieJson = cookies.get(p);
|
|
JSONObject cookieJson = cookies.get(p);
|
|
String cookie = cookieJson.getString("cookie");
|
|
String cookie = cookieJson.getString("cookie");
|
|
- ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
|
|
|
|
|
|
+ Long regimentalId = cookieJson.getLong("id");
|
|
|
|
+ ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd,regimentalId);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -262,7 +170,8 @@ public class KuaishouOrderLIstGetJob {
|
|
for (int p = 0; p < cookies.size(); p++) {
|
|
for (int p = 0; p < cookies.size(); p++) {
|
|
JSONObject cookieJson = cookies.get(p);
|
|
JSONObject cookieJson = cookies.get(p);
|
|
String cookie = cookieJson.getString("cookie");
|
|
String cookie = cookieJson.getString("cookie");
|
|
- ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
|
|
|
|
|
|
+ Long regimentalId = cookieJson.getLong("id");
|
|
|
|
+ ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd,regimentalId);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -307,7 +216,8 @@ public class KuaishouOrderLIstGetJob {
|
|
for (int p = 0; p < cookies.size(); p++) {
|
|
for (int p = 0; p < cookies.size(); p++) {
|
|
JSONObject cookieJson = cookies.get(p);
|
|
JSONObject cookieJson = cookies.get(p);
|
|
String cookie = cookieJson.getString("cookie");
|
|
String cookie = cookieJson.getString("cookie");
|
|
- ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
|
|
|
|
|
|
+ Long regimentalId = cookieJson.getLong("id");
|
|
|
|
+ ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd,regimentalId);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -350,7 +260,8 @@ public class KuaishouOrderLIstGetJob {
|
|
for (int p = 0; p < cookies.size(); p++) {
|
|
for (int p = 0; p < cookies.size(); p++) {
|
|
JSONObject cookieJson = cookies.get(p);
|
|
JSONObject cookieJson = cookies.get(p);
|
|
String cookie = cookieJson.getString("cookie");
|
|
String cookie = cookieJson.getString("cookie");
|
|
- ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd);
|
|
|
|
|
|
+ Long regimentalId = cookieJson.getLong("id");
|
|
|
|
+ ikuaishouSupplyChainService.getOrderList(cookie, 0, orderCreateTimeStart, orderCreateTimeEnd, regimentalId);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|