package com.jiayue.insu.inclientqn.job;

import com.jiayue.insu.inclientqn.entity.Station;
import com.jiayue.insu.inclientqn.permisson.com.BJZYYJYSDComPermisson;
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: 2023/12/15
 * @version: 1.0
 */
public class BJZYYJYSDComPermissonJob implements Job {

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