29 lines
810 B
Java
29 lines
810 B
Java
|
package com.hzs.third.job;
|
||
|
|
||
|
import com.hzs.member.account.IMemberJobServiceApi;
|
||
|
import com.hzs.sale.order.ISaOrderServiceApi;
|
||
|
import com.hzs.system.base.ICurrencyServiceApi;
|
||
|
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
|
||
|
ISaOrderServiceApi orderServiceApi;
|
||
|
|
||
|
/**
|
||
|
* 定时关单 订单三十分钟未支付自动关闭
|
||
|
*/
|
||
|
@XxlJob("autoCloseOrder")
|
||
|
public void timingCloseOrder() {
|
||
|
orderServiceApi.closeOrder();
|
||
|
}
|
||
|
|
||
|
}
|