liurunyu
2024-04-15 55d5046ae0a9da1109e402d7d719f765a4bccdae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.dy.pmsGlobal.daoBa;
 
import com.dy.pmsGlobal.pojoBa.BaPrivilege;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
@Mapper
public interface BaPrivilegeMapper {
    BaPrivilege selectByPrimaryKey(Long id);
 
    Long selectCount() ;
    /**
     * 查询全部
     * @return List<BaPrivilege>
     */
    List<BaPrivilege> selectAll() ;
 
    /**
     * 查询某个用户所隶属所有角色的所有权限
     * @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);
}