package com.palmnest.webapp.quartz;

import com.palmnest.service.dinner.service.OrderDinnerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

@Slf4j
//每天定时获取当天的订餐数据 代码中加了限制，前5次是从数据库中拿数据，后面的是从redis缓存中拿数据
@Component("orderDinnerGetOrderInfoTask")
public class OrderDinnerGetOrderInfoTask {

	@Autowired
	private OrderDinnerService orderDinnerService;

	private void run() {
		log.info("quartz into orderDinnerGetOrderInfoTask start ..." + new Date());
		orderDinnerService.getOrderInfoTask2("","");
		log.info("quartz into orderDinnerGetOrderInfoTask end ...");
	}

}
