|
@@ -135,43 +135,26 @@ public class TestController {
|
|
|
@GetMapping(value = "/getData")
|
|
|
public void getDate(String startDate, String endDate) throws Exception {
|
|
|
|
|
|
+ List<Long> list = new ArrayList<>();
|
|
|
+ list.add(1762865266399262L);
|
|
|
+ list.add(1762865060862030L);
|
|
|
+ list.add(1766565266301966L);
|
|
|
+ list.add(1769112767260813L);
|
|
|
|
|
|
-// Map<Long, Long> itemMap = activityItemListService.getItemMap();
|
|
|
-// System.err.println(itemMap);
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
+ Long accountId = list.get(i);
|
|
|
+ JSONObject json = ikuaishouSupplyChainService.seleById(accountId);
|
|
|
+ System.err.println(json);
|
|
|
+ Long id = json.getLong("id");
|
|
|
+ Long accountId1 = json.getLong("accountId");
|
|
|
+ String transferor = json.getString("transferor");
|
|
|
+ String username = json.getString("username");
|
|
|
+ ikuaishouSupplyChainService.updateAllocation(accountId1,transferor,username);
|
|
|
+ ikuaishouSupplyChainService.deleteTraById(id);
|
|
|
|
|
|
- List<JSONObject> cookies = ikuaishouSupplyChainService.getCookie();
|
|
|
- if (Check.isNull(cookies)) {
|
|
|
- log.error("cookie数据为空");
|
|
|
- return;
|
|
|
}
|
|
|
- List<String> days = DateUtils.getDays(startDate, endDate);
|
|
|
- JSONArray hourList = KuaishouHourEnum.getHourList();
|
|
|
- JSONArray minSecList = KuaishouMinSecEnum.getMinSecList();
|
|
|
- Map<Long, Long> itemMap = activityItemListService.getItemMap();
|
|
|
- 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;
|
|
|
- System.err.println("开始时间:" + start);
|
|
|
- System.err.println("结束时间:" + end);
|
|
|
- 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, itemMap);
|
|
|
- }
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|