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