package com.yuchen.saas.manage.scope.api.handler;

import com.yuchen.saas.manage.scope.api.cache.DataScopeCache;
import org.nest.springwrap.core.datascope.handler.ScopeModelHandler;
import org.nest.springwrap.core.datascope.model.DataScopeModel;

import java.util.List;


public class DataScopeModelHandler implements ScopeModelHandler {


    @Override
    public DataScopeModel getDataScopeByMapper(String mapperId, String roleId) {
        return DataScopeCache.getDataScopeByMapper(mapperId, roleId);
    }


    @Override
    public DataScopeModel getDataScopeByCode(String code) {
        return DataScopeCache.getDataScopeByCode(code);
    }


    @Override
    public List<Long> getDeptAncestors(Long deptId) {
        return DataScopeCache.getDeptAncestors(deptId);
    }
}
