Merge pull request #160 from LQYBill/feat/skipRecentOrdersFromMabang

Feat/skip recent orders from mabang
pull/8523/head
Qiuyi LI 2025-05-23 10:37:23 +02:00 committed by GitHub
commit b5811a8157
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -32,12 +32,13 @@ public class MabangJob implements Job {
private IPlatformOrderMabangService platformOrderMabangService;
private static final Integer DEFAULT_NUMBER_OF_DAYS = 5;
private static final Integer SKIP_RECENT_MINUTES = 5;
private static final DateType DEFAULT_DATE_TYPE = DateType.EXPRESS;
private static final List<OrderStatus> DEFAULT_STATUSES = Arrays.asList(AllUnshipped, Shipped, Completed);
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
LocalDateTime endDateTime = LocalDateTime.now(ZoneId.of(ZoneId.SHORT_IDS.get("CTT")));
LocalDateTime endDateTime = LocalDateTime.now(ZoneId.of(ZoneId.SHORT_IDS.get("CTT"))).minusMinutes(SKIP_RECENT_MINUTES);
LocalDateTime startDateTime = endDateTime.minusDays(DEFAULT_NUMBER_OF_DAYS);
DateType dateType = DEFAULT_DATE_TYPE;
boolean overrideRestriction = false;