package com.sunyard.ssp.modules.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunyard.ssp.modules.user.entity.ScPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author tsz
 * @since 2020-03-11
 */
public interface ScPermissionMapper extends BaseMapper<ScPermission> {

    List<ScPermission> findByUserId(@Param("userId") Long userId);

    List<ScPermission> findByLevelOrderBySortOrder(@Param("level") Integer level);

    List<ScPermission> findByParentIdOrderBySortOrder(@Param("parentId") Long parentId);

    List<ScPermission> findAll();

}
