|
|
|
|
@ -1,12 +1,13 @@
|
|
|
|
|
package cn.iocoder.yudao.module.pay.job.order;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
|
|
|
|
|
import cn.iocoder.yudao.module.pay.service.order.PayOrderService;
|
|
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
|
|
import jakarta.annotation.Resource;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
import jakarta.annotation.Resource;
|
|
|
|
|
import java.time.Duration;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
|
|
|
|
@ -35,10 +36,11 @@ public class PayOrderSyncJob {
|
|
|
|
|
|
|
|
|
|
@XxlJob("payOrderSyncJob")
|
|
|
|
|
@TenantJob // 多租户
|
|
|
|
|
public void execute() {
|
|
|
|
|
public String execute() {
|
|
|
|
|
LocalDateTime minCreateTime = LocalDateTime.now().minus(CREATE_TIME_DURATION_BEFORE);
|
|
|
|
|
int count = orderService.syncOrder(minCreateTime);
|
|
|
|
|
log.info("[execute][同步支付订单 ({}) 个]", count);
|
|
|
|
|
return StrUtil.format("同步支付订单 ({}) 个",count);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|