This commit is contained in:
雷欧(林平凡)
2024-12-06 16:38:29 +08:00
parent a1d5eb9db2
commit b6f1bd8253

View File

@@ -315,8 +315,9 @@ public class JDUtils {
* 每10分钟拉取07-14天的订单
*/
@Scheduled(cron = "0 */10 * * * ?")
public void fetchHistoricalOrders0714() {
public int fetchHistoricalOrders0714() {
int count = 0;
LocalDateTime now = LocalDateTime.now();
logger.info("拉取历史订单---> , {} 点,{} 分", now.getHour(), now.getMinute());
LocalDateTime lastHour = now.truncatedTo(ChronoUnit.HOURS).minusDays(7);
@@ -338,6 +339,7 @@ public class JDUtils {
OrderRow orderRow = createOrderRow(orderRowResp);
if (orderRow != null) { // Ensure orderRow is not null after creation
orderRowRepository.save(orderRow);
count++;
}
}
}
@@ -355,7 +357,9 @@ public class JDUtils {
if (hasMore) pageIndex++;
}
startDate = startDate.plusMinutes(10);
}
return count;
}
@Scheduled(cron = "0 */2 * * * ?")
public void fetchHistoricalOrders0007() {
@@ -465,9 +469,9 @@ public class JDUtils {
content.append("今日订单\r");
content.append("昨日订单\r");
content.append("刷新三天\r");
content.append("刷新3060\r\n");
content.append("刷新1430\r\n");
content.append("刷新0714\r\n");
content.append("刷新3060\r");
content.append("刷新1430\r");
content.append("刷新0714\r");
content.append("\n");
content.append(":::高级菜单:::\r");