package com.lantone.security.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lantone.security.dto.GetDataAuthDetailDTO;
import com.lantone.security.dto.GetDataAuthPageDTO;
import com.lantone.security.dto.SoftwareDataAuthDetail;
import com.lantone.security.vo.GetDataAuthPageVO;
import com.lantone.security.entity.DataAuth;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 表名：sys_data_auth Mapper接口
 * </p>
 */
public interface DataAuthMapper extends BaseMapper<DataAuth> {

    /**
     * @param Id
     * @Description通过数据权限id和角色id获取数据权限
     * @Return java.util.List<com.lantone.common.dto.SoftwareRoleDataAuthDetailDTO>
     */
    List<SoftwareDataAuthDetail> getDataAuthById(@Param("Id") Long Id);

    /**
     * @param softwareID
     * @param dataDetailID
     * @Description获取数据权限详情
     * @Return java.util.List<com.lantone.common.dto.SoftwareRoleDataAuthDetailDTO>
     */
    List<SoftwareDataAuthDetail> getOneSoftwareRoleDataAuthDetail(@Param("softwareID") Long softwareID, @Param("dataDetailID") Long dataDetailID);


    /**
     * @param getDataAuthPageVO
     * @Description获取数据权限列表
     * @Return com.baomidou.mybatisplus.core.metadata.IPage<com.lantone.security.dto.GetDataAuthPageDTO>
     */
    IPage<GetDataAuthPageDTO> getDataAuthPage(@Param("dataAuthVO") GetDataAuthPageVO getDataAuthPageVO);


    List<GetDataAuthDetailDTO> getDataAuth(@Param("userID") Long userID,@Param("softwareId") String softwareId);
}