Compare commits
2 Commits
30f5cb7a3d
...
caa0a24c24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
caa0a24c24 | ||
|
|
5faf591987 |
@@ -266,9 +266,9 @@ public class JDUtil {
|
|||||||
processOrderResponse(response, admin);
|
processOrderResponse(response, admin);
|
||||||
}
|
}
|
||||||
} catch (RateLimitExceededException e) {
|
} catch (RateLimitExceededException e) {
|
||||||
logger.warn("[限流] {} 请求频率受限", admin.getAppKey().substring(18));
|
logger.warn("[限流] {} 请求频率受限", admin.getName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("{} 订单抓取异常: {}", admin.getAppKey().substring(18), e.getMessage());
|
logger.error("{} 订单抓取异常: {}", admin.getName(), e.getMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -320,9 +320,9 @@ public class JDUtil {
|
|||||||
for (WXUtil.SuperAdmin admin : super_admins.values()) {
|
for (WXUtil.SuperAdmin admin : super_admins.values()) {
|
||||||
try {
|
try {
|
||||||
int count = fetchOrders(strategy, admin.getAppKey(), admin.getSecretKey());
|
int count = fetchOrders(strategy, admin.getAppKey(), admin.getSecretKey());
|
||||||
logger.info("账号{} 3090订单拉取完成,新增{}条", admin.getAppKey().substring(18), count);
|
logger.info("账号{} 3090订单拉取完成,新增{}条", admin.getName(), count);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("账号 {} 拉取异常: {}", admin.getAppKey().substring(18), e.getMessage());
|
logger.error("账号 {} 拉取异常: {}", admin.getName(), e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
@@ -344,9 +344,9 @@ public class JDUtil {
|
|||||||
for (WXUtil.SuperAdmin admin : super_admins.values()) {
|
for (WXUtil.SuperAdmin admin : super_admins.values()) {
|
||||||
try {
|
try {
|
||||||
int count = fetchOrders(strategy, admin.getAppKey(), admin.getSecretKey());
|
int count = fetchOrders(strategy, admin.getAppKey(), admin.getSecretKey());
|
||||||
logger.info("账号{} 1430订单拉取完成,新增{}条", admin.getAppKey().substring(18), count);
|
logger.info("账号{} 1430订单拉取完成,新增{}条", admin.getName(), count);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("账号 {} 拉取异常: {}", admin.getAppKey().substring(18), e.getMessage());
|
logger.error("账号 {} 拉取异常: {}", admin.getName(), e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
@@ -368,10 +368,10 @@ public class JDUtil {
|
|||||||
if (Util.isAnyEmpty(admin.getAppKey(), admin.getSecretKey())) return;
|
if (Util.isAnyEmpty(admin.getAppKey(), admin.getSecretKey())) return;
|
||||||
try {
|
try {
|
||||||
int count = fetchOrders(strategy, admin.getAppKey(), admin.getSecretKey());
|
int count = fetchOrders(strategy, admin.getAppKey(), admin.getSecretKey());
|
||||||
logger.info("账号{} 0714订单拉取完成,新增{}条", admin.getAppKey().substring(18), count);
|
logger.info("账号{} 0714订单拉取完成,新增{}条", admin.getName(), count);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("账号 {} 0714拉取异常: {}", admin.getAppKey().substring(18), e.getMessage());
|
logger.error("账号 {} 0714拉取异常: {}", admin.getName(), e.getMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
@@ -393,11 +393,11 @@ public class JDUtil {
|
|||||||
try {
|
try {
|
||||||
int count = fetchOrders(strategy, admin.getAppKey(), admin.getSecretKey());
|
int count = fetchOrders(strategy, admin.getAppKey(), admin.getSecretKey());
|
||||||
|
|
||||||
logger.info("账号{} 0007订单拉取完成,新增{}条", admin.getAppKey().substring(18), count);
|
logger.info("账号{} 0007订单拉取完成,新增{}条", admin.getName(), count);
|
||||||
} catch (RateLimitExceededException e) {
|
} catch (RateLimitExceededException e) {
|
||||||
logger.warn("[限流] {} 0007请求受限", admin.getAppKey().substring(18));
|
logger.warn("[限流] {} 0007请求受限", admin.getName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("账号{}0007拉取异常: {}", admin.getAppKey().substring(18), e.getMessage());
|
logger.error("账号{}0007拉取异常: {}", admin.getName(), e.getMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
@@ -474,7 +474,7 @@ public class JDUtil {
|
|||||||
|
|
||||||
private StringBuilder buildStatsContent(String title, OrderStats stats) {
|
private StringBuilder buildStatsContent(String title, OrderStats stats) {
|
||||||
StringBuilder content = new StringBuilder();
|
StringBuilder content = new StringBuilder();
|
||||||
content.append(title).append(":\n").append("订单总数:").append(stats.getTotalOrders()).append("\r").append("订单总数(不含取消):").append(stats.getValidOrders()).append("\r\n").append("已付款:").append(stats.getPaidOrders()).append("\r").append("已付款佣金:").append(stats.getPaidCommission()).append("\r\n").append("待付款:").append(stats.getPendingOrders()).append("\r") // 修正了原代码中的Stream未终止问题
|
content.append(title).append(":\r\n").append("订单总数:").append(stats.getTotalOrders()).append("\r").append("订单总数(不含取消):").append(stats.getValidOrders()).append("\r\n").append("已付款:").append(stats.getPaidOrders()).append("\r").append("已付款佣金:").append(stats.getPaidCommission()).append("\r\n").append("待付款:").append(stats.getPendingOrders()).append("\r") // 修正了原代码中的Stream未终止问题
|
||||||
.append("待付款佣金:").append(stats.getPendingCommission()).append("\r\n").append("已取消:").append(stats.getCanceledOrders()).append("\r").append("已完成:").append(stats.getCompletedOrders()).append("\r").append("已完成佣金:").append(stats.getCompletedCommission()).append("\r").append("违规:").append(stats.getViolations()).append("\r").append("违规佣金:").append(stats.getViolationCommission());
|
.append("待付款佣金:").append(stats.getPendingCommission()).append("\r\n").append("已取消:").append(stats.getCanceledOrders()).append("\r").append("已完成:").append(stats.getCompletedOrders()).append("\r").append("已完成佣金:").append(stats.getCompletedCommission()).append("\r").append("违规:").append(stats.getViolations()).append("\r").append("违规佣金:").append(stats.getViolationCommission());
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user