提交 | 用户 | 时间
|
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.framework.mybatis.core.query.LambdaQueryWrapperX; |
|
5 |
import com.iailab.module.system.controller.admin.permission.vo.menu.MenuListReqVO; |
|
6 |
import com.iailab.module.system.dal.dataobject.permission.MenuDO; |
|
7 |
import org.apache.ibatis.annotations.Mapper; |
|
8 |
|
818a01
|
9 |
import java.util.Collection; |
e7c126
|
10 |
import java.util.List; |
H |
11 |
|
|
12 |
@Mapper |
|
13 |
public interface MenuMapper extends BaseMapperX<MenuDO> { |
|
14 |
|
|
15 |
default MenuDO selectByParentIdAndName(Long parentId, String name) { |
|
16 |
return selectOne(MenuDO::getParentId, parentId, MenuDO::getName, name); |
|
17 |
} |
|
18 |
|
|
19 |
default Long selectCountByParentId(Long parentId) { |
|
20 |
return selectCount(MenuDO::getParentId, parentId); |
|
21 |
} |
|
22 |
|
|
23 |
default List<MenuDO> selectList(MenuListReqVO reqVO) { |
|
24 |
return selectList(new LambdaQueryWrapperX<MenuDO>() |
|
25 |
.likeIfPresent(MenuDO::getName, reqVO.getName()) |
|
26 |
.eqIfPresent(MenuDO::getStatus, reqVO.getStatus())); |
|
27 |
} |
|
28 |
|
874287
|
29 |
default List<MenuDO> selectAppMenuList(MenuListReqVO reqVO) { |
818a01
|
30 |
return selectList(new LambdaQueryWrapperX<MenuDO>() |
H |
31 |
.likeIfPresent(MenuDO::getName, reqVO.getName()) |
874287
|
32 |
.eqIfPresent(MenuDO::getStatus, reqVO.getStatus())); |
818a01
|
33 |
} |
H |
34 |
|
e7c126
|
35 |
default List<MenuDO> selectListByPermission(String permission) { |
H |
36 |
return selectList(MenuDO::getPermission, permission); |
|
37 |
} |
818a01
|
38 |
|
H |
39 |
default List<MenuDO> selectListByParentId(Collection<Long> parentIds) { |
|
40 |
return selectList(MenuDO::getParentId, parentIds); |
|
41 |
} |
e7c126
|
42 |
} |