package com.hdkj.lt.job.task;

import com.hdkj.lt.core.sys.service.DwdShbDsFeederBaseService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author luorui
 * @date 2025/6/24 18:47
 * @discription 定时刷新，线路信息缓存
 **/
@Slf4j
@Component("feederCacheRefresh")
@RequiredArgsConstructor
public class FeederCacheRefreshProcessor {

    private final DwdShbDsFeederBaseService dwdShbDsFeederBaseService;

    public void noParams() {
        log.info("=====线路信息缓存刷新定时任务开始执行=====");
        long startTime = System.nanoTime();
        dwdShbDsFeederBaseService.refreshAllFeederCache();
        long endTime = System.nanoTime();
        log.info("=====线路信息缓存刷新定时任务执行完成耗时：{}ms=====", (endTime - startTime) / 1_000_000);
    }
}
