liurunyu
2023-11-08 92fecf2191c5f0a3b1086abababb7922929cb1c5
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.pipIrrGlobal.daoBa;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoBa.BaPrivilege;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
public interface BaPrivilegeMapper extends BaseMapper<BaPrivilege> {
     /**
     * 查询全部
     * @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) ;
 
    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(BaPrivilege record);
 
    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(BaPrivilege record);
 
}