package com.lantone.security.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lantone.security.dto.GetCreateRoleDTO;
import com.lantone.security.dto.GetRolePageDTO;
import com.lantone.security.dto.UserRoleDTO;
import com.lantone.security.vo.GetRolePageVO;
import com.lantone.security.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 表名：sys_role Mapper接口
 * </p>
 */
public interface RoleMapper extends BaseMapper<Role> {
    /**
     * @param getRolePageVO
     * @Description获取角色列表
     * @Return java.util.List<com.lantone.security.entity.Role>
     * @Date 2021/7/30
     */
    IPage<GetRolePageDTO> getRolePage(@Param("getRolePageVO") GetRolePageVO getRolePageVO);

    List<GetCreateRoleDTO> getCreateRoles(@Param("creator") Long creator,@Param("softwareId") Long softwareId);

    List<UserRoleDTO> getDataAuthRole(@Param("creator") Long creator,@Param("roles")List<Long> roles,@Param("dataTypes")List<Long> dataTypes);

    int getCount(@Param("roles")List<Long> roles,@Param("status") String status,@Param("delete") String delete);
}