package com.jiayue.insu.inclientqn.job;

import com.jiayue.insu.inclientqn.entity.Station;
import com.jiayue.insu.inclientqn.permisson.com.ComPermisson;
import com.jiayue.insu.inclientqn.service.StationService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;

/**
 * @description:  请求一体化 交互权限
 * @author: yuanhao
 * @createDate: 2022/6/17
 * @version: 1.0
 */
public class ComPermissonJob implements Job {

    @Autowired
    private ComPermisson comPermisson;
    @Autowired
    private StationService stationService;
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        List<Station> stationList = stationService.findAll();
        for(Station station : stationList){
            comPermisson.generateKey(station);
        }
    }
}
