package com.saye.hrs.scheduler;


import com.saye.hrs.commons.log.LogUtil;
import com.saye.hrs.service.OrderService;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

import javax.annotation.Resource;

@Configuration
public class GenerateOrderNotice {

	 @Resource
	 private OrderService orderService;
	/**
	 * @description 每天晚上检查后天是否有预约  有就添加一条消息提醒
	 * @author dqzhang       
	 * @created 2021年11月28日 上午9:48:42
	 */
    @Scheduled(cron="0 30 10 * * ?")
    public void run() {
    	LogUtil.debug(SyncAccountRecord.class, "检查预约提醒开始！");
    	try {
    		this.orderService.generateOrderNotice();
    	} catch (Exception e) {
			LogUtil.error(SyncAccountRecord.class, "检查预约提醒异常"+e.toString());
		}
    	LogUtil.debug(SyncAccountRecord.class, "检查预约提醒结束！");
    }
}
