提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.dal.mysql.permission; |
H |
2 |
|
|
3 |
import com.iailab.framework.mybatis.core.mapper.BaseMapperX; |
|
4 |
import com.iailab.module.system.dal.dataobject.permission.RoleMenuDO; |
|
5 |
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
6 |
import org.apache.ibatis.annotations.Mapper; |
|
7 |
|
|
8 |
import java.util.Collection; |
|
9 |
import java.util.List; |
|
10 |
|
|
11 |
@Mapper |
|
12 |
public interface RoleMenuMapper extends BaseMapperX<RoleMenuDO> { |
|
13 |
|
|
14 |
default List<RoleMenuDO> selectListByRoleId(Long roleId) { |
|
15 |
return selectList(RoleMenuDO::getRoleId, roleId); |
|
16 |
} |
|
17 |
|
|
18 |
default List<RoleMenuDO> selectListByRoleId(Collection<Long> roleIds) { |
|
19 |
return selectList(RoleMenuDO::getRoleId, roleIds); |
|
20 |
} |
|
21 |
|
|
22 |
default List<RoleMenuDO> selectListByMenuId(Long menuId) { |
|
23 |
return selectList(RoleMenuDO::getMenuId, menuId); |
|
24 |
} |
|
25 |
|
|
26 |
default void deleteListByRoleIdAndMenuIds(Long roleId, Collection<Long> menuIds) { |
|
27 |
delete(new LambdaQueryWrapper<RoleMenuDO>() |
|
28 |
.eq(RoleMenuDO::getRoleId, roleId) |
|
29 |
.in(RoleMenuDO::getMenuId, menuIds)); |
|
30 |
} |
|
31 |
|
|
32 |
default void deleteListByMenuId(Long menuId) { |
|
33 |
delete(new LambdaQueryWrapper<RoleMenuDO>().eq(RoleMenuDO::getMenuId, menuId)); |
|
34 |
} |
|
35 |
|
|
36 |
default void deleteListByRoleId(Long roleId) { |
|
37 |
delete(new LambdaQueryWrapper<RoleMenuDO>().eq(RoleMenuDO::getRoleId, roleId)); |
|
38 |
} |
|
39 |
|
|
40 |
} |