package com.jiayue.insu.inclientqn.service.client;

import com.jiayue.insu.inclientqn.entity.Station;
import com.jiayue.insu.inclientqn.permisson.com.ComPermisson;
import com.jiayue.insu.inclientqn.service.StationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class InitRunner implements CommandLineRunner {
    @Autowired
    private ComPermisson comPermisson;
    @Autowired
    private StationService stationService;
    @Autowired
    private BackDataAnalysisService backDataAnalysisService;
    @Override
    public void run(String... args) throws Exception {
        Station station = stationService.findThis();
        comPermisson.generateKey(station);
        backDataAnalysisService.watchFile();
    }
}
