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

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.controller.admin.houselocation.vo.WareHouseLocationTypePageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.houselocation.WareHouseLocationTypeDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 库位类型 Mapper
 *
 * @author 陈宾顺
 */
@Mapper
public interface WareHouseLocationTypeMapper extends BaseMapperX<WareHouseLocationTypeDO> {

    default PageResult<WareHouseLocationTypeDO> selectPage(WareHouseLocationTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WareHouseLocationTypeDO>()
                .likeIfPresent(WareHouseLocationTypeDO::getTypeName, reqVO.getTypeName())
                .eqIfPresent(WareHouseLocationTypeDO::getLocationSort, reqVO.getLocationSort())
                .eqIfPresent(WareHouseLocationTypeDO::getLocationWide, reqVO.getLocationWide())
                .eqIfPresent(WareHouseLocationTypeDO::getLocationDeep, reqVO.getLocationDeep())
                .eqIfPresent(WareHouseLocationTypeDO::getLocationHeight, reqVO.getLocationHeight())
                .eqIfPresent(WareHouseLocationTypeDO::getLocationLoad, reqVO.getLocationLoad())
                .betweenIfPresent(WareHouseLocationTypeDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WareHouseLocationTypeDO::getId));
    }

}