package com.lantone.security.component;

import com.lantone.security.facade.base.DataAuthFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @Description: 用户的数据权限操作组件
 * @author: rengb
 * @time: 2021/1/5 18:27
 */
@Component
public class UserDataAuthHolder implements CommandLineRunner {

    @Autowired
    private DataAuthFacade dataAuthFacade;

    /**
     * 预加载所有用户的数据权限
     */
    @Override
    public void run(String... args) throws Exception {
        dataAuthFacade.initUserDataAuth();
    }

}