package org.nl.system.service.permission.dao.mapper;

import org.apache.ibatis.annotations.Param;
import org.nl.system.service.permission.dao.SysDataPermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.nl.system.service.permission.dao.SysDataScope;

import java.util.List;

/**
 * <p>
 * 数据数据权限表 Mapper 接口
 * </p>
 *
 * @author generator
 * @since 2022-12-20
 */
public interface SysDataPermissionMapper extends BaseMapper<SysDataPermission> {

    List<String> findDataScopeUserIdBySelfUserIdAndScopeType(String userId, String permissionScopeType);

    List<String> findDataScopeDeptIdBySelfUserIdAndScopeType(String userId, String permissionScopeType);

    void deleteScopeBySelfUserId(String userId);

    void insertDataScope(@Param("dataScope") SysDataScope dataScope);

    void insertDataScopes(@Param("dataScope") SysDataScope dataScope);

    List<SysDataScope> getDataDetail(String selfUserId, String permissionScopeType);
}
