package com.energy.manage.service.mappers.system;

import com.energy.manage.common.mapper.MyMapper;
import com.energy.manage.common.po.system.SysPermissionPO;
import com.energy.manage.service.domain.dto.system.SystemPermissionListDto;
import com.energy.manage.service.domain.vo.system.PermissionVo;
import com.energy.manage.service.domain.vo.system.SystemPermissionVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 资源表
 * 
 * @author sy
 * @date 2021-10-18 13:32:05
 */
@Repository
public interface SysPermissionMapper extends MyMapper<SysPermissionPO> {

    int getMaxDepth();

    List<SystemPermissionVo> getAllPermission(@Param("permissionListDto") SystemPermissionListDto systemPermissionListDto);

    List<PermissionVo> getRolePermissionByUserId(@Param("userId") Integer userId);

    int getRolePermissionMaxDepth(@Param("userId") Integer userId);

    int updatePermissionSelective(SysPermissionPO po);

}
