提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.dal.mysql.dept; |
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.dept.vo.dept.DeptListReqVO; |
|
6 |
import com.iailab.module.system.dal.dataobject.dept.DeptDO; |
|
7 |
import org.apache.ibatis.annotations.Mapper; |
|
8 |
|
|
9 |
import java.util.Collection; |
|
10 |
import java.util.List; |
|
11 |
|
|
12 |
@Mapper |
|
13 |
public interface DeptMapper extends BaseMapperX<DeptDO> { |
|
14 |
|
|
15 |
default List<DeptDO> selectList(DeptListReqVO reqVO) { |
|
16 |
return selectList(new LambdaQueryWrapperX<DeptDO>() |
|
17 |
.likeIfPresent(DeptDO::getName, reqVO.getName()) |
|
18 |
.eqIfPresent(DeptDO::getStatus, reqVO.getStatus())); |
|
19 |
} |
|
20 |
|
|
21 |
default DeptDO selectByParentIdAndName(Long parentId, String name) { |
|
22 |
return selectOne(DeptDO::getParentId, parentId, DeptDO::getName, name); |
|
23 |
} |
|
24 |
|
|
25 |
default Long selectCountByParentId(Long parentId) { |
|
26 |
return selectCount(DeptDO::getParentId, parentId); |
|
27 |
} |
|
28 |
|
|
29 |
default List<DeptDO> selectListByParentId(Collection<Long> parentIds) { |
|
30 |
return selectList(DeptDO::getParentId, parentIds); |
|
31 |
} |
|
32 |
|
|
33 |
} |