package com.dcit.authority.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DataAccessException;

import com.dcit.authority.model.SysResources;
import com.dcit.authority.model.SysResourcesExample;
import com.dcit.authority.shiro.domain.RolePermRule;

public interface SysResourcesMapper {
    int countByExample(SysResourcesExample example);

    int deleteByExample(SysResourcesExample example);

    int deleteByPrimaryKey(String id);

    int insert(SysResources record);

    int insertSelective(SysResources record);

    List<SysResources> selectByExample(SysResourcesExample example);

    SysResources selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") SysResources record, @Param("example") SysResourcesExample example);

    int updateByExample(@Param("record") SysResources record, @Param("example") SysResourcesExample example);

    int updateByPrimaryKeySelective(SysResources record);

    int updateByPrimaryKey(SysResources record);
    
    List<RolePermRule> selectRoleRules() throws DataAccessException;

    List<SysResources> selectAuthorityMenusByUid(String uid) throws DataAccessException;

    List<SysResources> selectMenus() throws DataAccessException;

    List<SysResources> selectApiTeamList() throws DataAccessException;

    List<SysResources> selectApiList() throws DataAccessException;

    List<SysResources> selectApiListByTeamId(String teamId) throws DataAccessException;

    List<SysResources> selectApisByRoleId(String roleId) throws DataAccessException;

    List<SysResources> selectMenusByRoleId(String roleId) throws DataAccessException;

    List<SysResources> selectNotAuthorityApisByRoleId(String roleId) throws DataAccessException;

    List<SysResources> selectNotAuthorityMenusByRoleId(String roleId) throws DataAccessException;
}