package cn.com.ty.lift.batch.config;

import cn.com.ty.lift.batch.applet.util.DataInitUtil;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

import javax.annotation.Resource;

/**
 * @author huangyuan
 * @date 2020/2/3
 * @description 小程序数据统计定时类
 */
@Configuration
@EnableScheduling
public class AppletDataSchedulingConfig {

    @Resource
    private DataInitUtil dataInitUtil;

    //定时刷新redis中的数据，每天凌晨两点执行
    //@Scheduled(cron = "0 0 2 * * ?")
    public void flushRedisCacheData(){
        dataInitUtil.initAppletData();
    }

}
