package cn.iocoder.yudao.module.system.dal.mysql.biz;

/**
 * @Author: jinyd
 * @CreateTime: 2024/8/19  11:34
 * @Description:
 * @Version: 4.0
 */

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.system.controller.admin.biz.vo.DeviceCategoryPageReqVO;
import cn.iocoder.yudao.module.system.controller.admin.biz.vo.ManufacturerPageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.biz.DeviceCategoryDO;
import cn.iocoder.yudao.module.system.dal.dataobject.biz.ManufacturerDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 床位变更记录 Mapper
 *
 * @author 系统管理员
 */
@Mapper
public interface DeviceCategoryMapper extends BaseMapperX<DeviceCategoryDO> {

    default PageResult<DeviceCategoryDO> selectPage(DeviceCategoryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DeviceCategoryDO>()
                .likeIfPresent(DeviceCategoryDO::getName, reqVO.getName())
                .eqIfPresent(DeviceCategoryDO::getStatus, reqVO.getStatus())
                .eqIfPresent(DeviceCategoryDO::getType, reqVO.getType())
                .eqIfPresent(DeviceCategoryDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(DeviceCategoryDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(DeviceCategoryDO::getId));
    }


}
