gaoluyang
2026-10-30 cbadfd8e691ab335965202a984db16e55ac8e42c
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
32
33
34
35
36
37
38
39
40
41
package cn.iocoder.yudao.module.hrm.dal.mysql.supply;
 
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
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.HrmSupplyPageReqVO;
import cn.iocoder.yudao.module.hrm.dal.dataobject.supply.HrmSupplyDO;
import org.apache.ibatis.annotations.Mapper;
 
import java.util.List;
 
/**
 * 办公用品档案 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface HrmSupplyMapper extends BaseMapperX<HrmSupplyDO> {
 
    default PageResult<HrmSupplyDO> selectPage(HrmSupplyPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<HrmSupplyDO>()
                .likeIfPresent(HrmSupplyDO::getCode, reqVO.getCode())
                .likeIfPresent(HrmSupplyDO::getName, reqVO.getName())
                .eqIfPresent(HrmSupplyDO::getCategory, reqVO.getCategory())
                .eqIfPresent(HrmSupplyDO::getStatus, reqVO.getStatus())
                .orderByDesc(HrmSupplyDO::getId));
    }
 
    default HrmSupplyDO selectByCode(String code) {
        return selectOne(HrmSupplyDO::getCode, code);
    }
 
    default List<HrmSupplyDO> selectEnabledList() {
        return selectList(new LambdaQueryWrapperX<HrmSupplyDO>()
                .eq(HrmSupplyDO::getStatus, CommonStatusEnum.ENABLE.getStatus())
                .orderByAsc(HrmSupplyDO::getCode)
                .orderByAsc(HrmSupplyDO::getId));
    }
 
}