懒羊羊
2024-01-31 e57a8990ae56f657a59c435a0613c5f7a8728003
提交 | 用户 | 时间
e57a89 1 package com.jcdm.system.mapper;
2
3 import java.util.List;
4 import org.apache.ibatis.annotations.Param;
5 import com.jcdm.system.domain.SysUserRole;
6
7 /**
8  * 用户与角色关联表 数据层
9  * 
10  * @author jc
11  */
12 public interface SysUserRoleMapper
13 {
14     /**
15      * 通过用户ID删除用户和角色关联
16      * 
17      * @param userId 用户ID
18      * @return 结果
19      */
20     public int deleteUserRoleByUserId(Long userId);
21
22     /**
23      * 批量删除用户和角色关联
24      * 
25      * @param ids 需要删除的数据ID
26      * @return 结果
27      */
28     public int deleteUserRole(Long[] ids);
29
30     /**
31      * 通过角色ID查询角色使用数量
32      * 
33      * @param roleId 角色ID
34      * @return 结果
35      */
36     public int countUserRoleByRoleId(Long roleId);
37
38     /**
39      * 批量新增用户角色信息
40      * 
41      * @param userRoleList 用户角色列表
42      * @return 结果
43      */
44     public int batchUserRole(List<SysUserRole> userRoleList);
45
46     /**
47      * 删除用户和角色关联信息
48      * 
49      * @param userRole 用户和角色关联信息
50      * @return 结果
51      */
52     public int deleteUserRoleInfo(SysUserRole userRole);
53
54     /**
55      * 批量取消授权用户角色
56      * 
57      * @param roleId 角色ID
58      * @param userIds 需要删除的用户数据ID
59      * @return 结果
60      */
61     public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
62 }