package com.hys.app.mapper.erp;

import com.hys.app.framework.database.WebPage;
import com.hys.app.framework.database.mybatisplus.base.BaseMapperX;
import com.hys.app.model.erp.dos.WarehouseAreaDO;
import com.hys.app.model.erp.dto.WarehouseAreaQueryParams;

/**
 * 出库单商品明细的Mapper
 *
 * @author 张崧
 * @since 2023-12-07 17:06:32
 */
public interface WarehouseAreaMapper extends BaseMapperX<WarehouseAreaDO> {

    default WebPage<WarehouseAreaDO> selectPage(WarehouseAreaQueryParams params) {
        return lambdaQuery()
                .eqIfPresent(WarehouseAreaDO::getWarehouseId, params.getWarehouseId())
                .likeIfPresent(WarehouseAreaDO::getCode, params.getCode())
                .likeIfPresent(WarehouseAreaDO::getName, params.getName())
                .eqIfPresent(WarehouseAreaDO::getStatus, params.getStatus())
                .orderByDesc(WarehouseAreaDO::getId)
                .page(params);
    }

}

