重构评论
This commit is contained in:
@@ -198,6 +198,7 @@ public class JDScheduleJob {
|
||||
Arrays.stream(response.getQueryResult().getData()).parallel().map(this::createOrderRow).forEach(orderRowRepository::save);
|
||||
}
|
||||
public int fetchOrders(OrderFetchStrategy strategy, String appKey, String secretKey) {
|
||||
|
||||
TimeRange range = strategy.calculateRange(LocalDateTime.now());
|
||||
int count = 0;
|
||||
|
||||
@@ -304,6 +305,9 @@ public class JDScheduleJob {
|
||||
OrderFetchStrategy strategy = new Days3090Strategy();
|
||||
for (WXUtil.SuperAdmin admin : super_admins.values()) {
|
||||
try {
|
||||
if (Util.isAnyEmpty(admin.getAppKey(), admin.getSecretKey())){
|
||||
continue;
|
||||
}
|
||||
int count = fetchOrders(strategy, admin.getAppKey(), admin.getSecretKey());
|
||||
logger.info("账号{} 3090订单拉取完成,新增{}条", admin.getName(), count);
|
||||
} catch (Exception e) {
|
||||
@@ -328,6 +332,9 @@ public class JDScheduleJob {
|
||||
OrderFetchStrategy strategy = new Days1430Strategy(); // 需补充Days1430Strategy实现
|
||||
for (WXUtil.SuperAdmin admin : super_admins.values()) {
|
||||
try {
|
||||
if (Util.isAnyEmpty(admin.getAppKey(), admin.getSecretKey())){
|
||||
continue;
|
||||
}
|
||||
int count = fetchOrders(strategy, admin.getAppKey(), admin.getSecretKey());
|
||||
logger.info("账号{} 1430订单拉取完成,新增{}条", admin.getName(), count);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -174,6 +174,11 @@ public class WXUtil {
|
||||
jdidToWxidMap.put(admin10.getUnionId(), admin10.getWxid());
|
||||
jdidToRemarkMap.put(admin10.getUnionId(), admin10.getName());
|
||||
|
||||
//102|12:50:55|wxid_kr145nk7l0an31|收到私聊|:1
|
||||
SuperAdmin admin11 = new SuperAdmin("wxid_cfmrk2upjtf322", "0213", "", "", "");
|
||||
super_admins.put(admin11.getWxid() + admin11.getUnionId(), admin11);
|
||||
|
||||
|
||||
/* 内部管理群 */
|
||||
|
||||
// 方案
|
||||
|
||||
Reference in New Issue
Block a user