package com.org.hktshop.service.order.task;

import com.org.hktshop.service.order.HktOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class OrderTask {
    @Autowired
    private HktOrderService orderService;

    @Scheduled(cron = "0 0/1 * * * ?")
    public void updateOrderStatus(){
        orderService.batchUpdateOrderStatusIsCancel();
    }

}
