//package com.fjs.scenic.job;
//
//import com.fjs.scenic.service.scenic.ScenicIndexService;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.redis.core.RedisTemplate;
//import org.springframework.scheduling.annotation.EnableScheduling;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//@Component
//@Configuration      //1.主要用于标记配置类，兼备Component的效果。
//@EnableScheduling   // 2.开启定时任务
//public class IndexTopJob {
//
//    private Logger log = LoggerFactory.getLogger(IndexTopJob.class);
//
//    @Autowired
//    private RedisTemplate<String, Object> redisTemplate;
//    @Autowired
//    private ScenicIndexService scenicIndexService;
//
//   // @Scheduled(cron="* 0/5 * * * ?")
//    public void refundTikcit() {
//        log.info("IndexTopTasks --- > 开始");
//        redisTemplate.opsForValue().set("indexTopData", scenicIndexService.scenic());
//        log.info("IndexTopTasks --- > 结束");
//        System.out.println("IndexTopTasks");
//    }
//
//
//}
