| package com.dy.pmsGlobal.daoBa; | 
|   | 
| import com.dy.pmsGlobal.pojoBa.BaLog; | 
| import com.dy.pmsGlobal.pojoBa.BaPrivilege; | 
| import org.apache.ibatis.annotations.MapKey; | 
| import org.apache.ibatis.annotations.Mapper; | 
| import org.apache.ibatis.annotations.Param; | 
|   | 
| import java.util.List; | 
| import java.util.Map; | 
|   | 
| @Mapper | 
| public interface BaPrivilegeMapper { | 
|     BaPrivilege selectByPrimaryKey(Long id); | 
|   | 
|     Long selectCount() ; | 
|     /** | 
|      * 查询全部 | 
|      * @return List<BaPrivilege> | 
|      */ | 
|     List<BaPrivilege> selectAll() ; | 
|   | 
|     List<BaPrivilege> selectSome(Map<String, Object> params); | 
|   | 
|     Long selectSomeCount(Map<String, Object> params); | 
|   | 
|     List<BaPrivilege> selectByIds(List<String> ids) ; | 
|   | 
|     /** | 
|      * 查询某个用户所隶属所有角色的所有权限 | 
|      * @param userId 用户ID | 
|      * @return List<Integer> | 
|      */ | 
|     List<Integer> selectPrivilegeByUserId(@Param("userId") Long userId) ; | 
|   | 
|     /** | 
|      * 查询某个角色所隶属于该角色的所有权限 | 
|      * @param roleId 用户ID | 
|      * @return List<Integer> | 
|      */ | 
|     List<Integer> selectPrivilegeByRoleId(@Param("roleId") Long roleId) ; | 
|   | 
|   | 
|     int insert(BaPrivilege record); | 
|   | 
|     int insertSelective(BaPrivilege record); | 
|   | 
|     int updateByPrimaryKeySelective(BaPrivilege record); | 
|   | 
|     int updateByPrimaryKey(BaPrivilege record); | 
|   | 
|     int deleteByPrimaryKey(Long id); | 
| } |