2025-03-23 09:44:16 +08:00
|
|
|
package com.hzs.third.job;
|
|
|
|
|
|
|
|
import com.hzs.sale.order.ISaOrderServiceApi;
|
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
@ConditionalOnProperty(name = "xxl-job.start", havingValue = "true")
|
|
|
|
@Component
|
|
|
|
public class OrderJob {
|
|
|
|
|
|
|
|
@DubboReference
|
2025-06-09 09:20:08 +08:00
|
|
|
ISaOrderServiceApi iSaOrderServiceApi;
|
2025-03-23 09:44:16 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 定时关单 订单三十分钟未支付自动关闭
|
|
|
|
*/
|
|
|
|
@XxlJob("autoCloseOrder")
|
|
|
|
public void timingCloseOrder() {
|
2025-06-09 09:20:08 +08:00
|
|
|
iSaOrderServiceApi.closeOrder();
|
2025-03-23 09:44:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|