gaoluyang
10 天以前 9e9f0e2d9f6fcce7dcea88b181b3c7e6069e8a1b
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
package cn.iocoder.yudao.module.hrm.dal.mysql.supply;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.hrm.controller.admin.supply.vo.HrmSupplyIssuePageReqVO;
import cn.iocoder.yudao.module.hrm.dal.dataobject.supply.HrmSupplyIssueDO;
import org.apache.ibatis.annotations.Mapper;
 
/**
 * 办公用品领用申请 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface HrmSupplyIssueMapper extends BaseMapperX<HrmSupplyIssueDO> {
 
    default PageResult<HrmSupplyIssueDO> selectPage(HrmSupplyIssuePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<HrmSupplyIssueDO>()
                .eqIfPresent(HrmSupplyIssueDO::getSupplyId, reqVO.getSupplyId())
                .eqIfPresent(HrmSupplyIssueDO::getUserId, reqVO.getUserId())
                .eqIfPresent(HrmSupplyIssueDO::getDeptId, reqVO.getDeptId())
                .eqIfPresent(HrmSupplyIssueDO::getStatus, reqVO.getStatus())
                .orderByDesc(HrmSupplyIssueDO::getId));
    }
 
    default Long selectCountBySupplyId(Long supplyId) {
        return selectCount(HrmSupplyIssueDO::getSupplyId, supplyId);
    }
 
}