package com.yami.shop.platform.task;

import com.yami.shop.service.hb.IHBOrderService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Component("OrderPushTask")
public class OrderPushTask {

    private Logger log = LoggerFactory.getLogger(getClass());

    @Autowired
    private IHBOrderService hbOrderService;

    @Scheduled(cron = "0 0 */1 * * ?")
//    @Scheduled(cron = "0/2 * * * * ?")
    public synchronized void syncHBOrder() {
        log.info("海博订单同步定时任务开始");
        hbOrderService.syncHBOrder();
        log.info("海博订单同步定时任务结束");
    }

}
