package com.fs.task;

import com.fs.common.annotation.QuartzRunnable;
import com.fs.express.IExpressService;
import com.fs.store.service.IFsStoreOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 物流信息定时任务
 */
@Slf4j
@Component("expressTask")
public class ExpressTask {

    @Autowired
    private IExpressService expressService;

    @Autowired
    private IFsStoreOrderService fsStoreOrderService;
    /**
     * 推送物流信息到快递鸟定时任务
     */
    @QuartzRunnable(name="推送物流信息到快递鸟定时任务")
    public void subscribeExpress(){
        expressService.subscribeExpress();
    }

    @QuartzRunnable(name="同步物流信息到微信")
    public void syncExpressToWx(){
        fsStoreOrderService.syncExpressToWx();
    }

}
