|
@@ -33,10 +33,8 @@ public class settlementJob {
|
|
|
String date = DateUtils.getLastDay(DateUtils.date2Str(), 1);
|
|
|
Long statDate = Long.valueOf(date.replace("-", ""));
|
|
|
List<JSONObject> list = ikuaishouSupplyChainService.getDataList(statDate);
|
|
|
-
|
|
|
if (Check.isNull(list)) {
|
|
|
return;
|
|
|
-
|
|
|
}
|
|
|
List<List<JSONObject>> partition = Lists.partition(list, 1000);
|
|
|
for (int i = 0; i < partition.size(); i++) {
|
|
@@ -51,5 +49,25 @@ public class settlementJob {
|
|
|
|
|
|
|
|
|
|
|
|
+ @XxlJob("cleanPromoterSettlementData")
|
|
|
+ public void cleanPromoterSettlementData() {
|
|
|
+ String url = "http://ruixuan.api.tjyourong.com.cn/settlement/promoterData";
|
|
|
+ String date = DateUtils.getLastDay(DateUtils.date2Str(), 1);
|
|
|
+ Long statDate = Long.valueOf(date.replace("-", ""));
|
|
|
+ List<JSONObject> list = ikuaishouSupplyChainService.getPromoterDataList(statDate);
|
|
|
+ if (Check.isNull(list)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<List<JSONObject>> partition = Lists.partition(list, 1000);
|
|
|
+ for (int i = 0; i < partition.size(); i++) {
|
|
|
+ List<JSONObject> jsonObjects = partition.get(i);
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("statDate", statDate);
|
|
|
+ param.put("data", jsonObjects);
|
|
|
+ HttpUtils.httpPostRequest(url, param, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|