package com.iotechn.unimall.admin;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by rize on 2019/7/21.
 */
@Component
@EnableScheduling
public class AdminCheckQuartz {

    private static final Logger logger = LoggerFactory.getLogger(AdminCheckQuartz.class);
    private static final String ORDER_STATUS_LOCK = "ORDER_STATUS_QUARTZ_LOCK";
    private static final String GROUP_SHOP_START_LOCK = "GROUP_SHOP_START_LOCK";
    private static final String GROUP_SHOP_END_LOCK = "GROUP_SHOP_END_LOCK";
    private static final String GROUP_SHOP_LOCK_LOCK = "GROUP_SHOP_LOCK_LOCK";
    ExecutorService pool = Executors.newFixedThreadPool(2);

    /**
     * 订单数据定时轮训处理 每小时执行一次
     */
//    @Scheduled(cron = "0 0 7-22 * * ? ")
    public void task1(){
        new Thread(new Runnable() {
            @Override
            public void run() {
            }
        }).start();
    }
    /**
     * 订单数据定时轮训处理 每30分钟执行一次
     */
//    @Scheduled(cron = "0 0/30 * * * ? ")
    public void task2(){
        new Thread(new Runnable() {
            @Override
            public void run() {
            }
        }).start();
    }
    public void dealOrder() throws Exception {

    }


}
