package com.yeejoin.amos.boot.module.jyjc.biz.runner;

import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationServiceImpl;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcOpeningApplicationServiceImpl;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author Administrator
 */
@Component
public class ApplicationRunnerImpl implements ApplicationRunner {

    private JyjcInspectionApplicationServiceImpl inspectionApplicationService;
    private JyjcOpeningApplicationServiceImpl openingApplicationService;

    public ApplicationRunnerImpl(JyjcInspectionApplicationServiceImpl inspectionApplicationService,
                                 JyjcOpeningApplicationServiceImpl openingApplicationService) {
        this.inspectionApplicationService = inspectionApplicationService;
        this.openingApplicationService = openingApplicationService;
    }

    @Override
    public void run(ApplicationArguments args) {
        inspectionApplicationService.initFlowData2Redis();
        openingApplicationService.initFlowData2Redis();
    }
}
