package com.tykj.dev.statistical.cache;

import com.tykj.dev.statistical.service.BigScreenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.annotation.Order;

/**
 * BigScreenCacheConfig.
 *
 * @author Matrix <xhyrzldf@gmail.com>
 * @since 2021/9/9 at 1:57 下午
 */
@Configuration
public class BigScreenCacheConfig {

    @Autowired
    private BigScreenService bigScreenService;

    @Bean
//    @DependsOn("init2")
    public BigScreenCache initBigScreenCache(){
        return new BigScreenCache(bigScreenService.getAllDeviceNum(),bigScreenService.getBusinessNum(2),bigScreenService.getCenterNum(),bigScreenService.getRepairNum(),bigScreenService.getRepairDevices(),bigScreenService.getSelfCheckNum(),bigScreenService.selectUserDataScreen());
    }


}
