package com.cf.imes.module.executor.dal.mysql.orderModuleExtra;

import java.util.*;

import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.orderModuleExtra.OrderModuleExtraDO;
import org.apache.ibatis.annotations.Mapper;
import com.cf.imes.module.executor.controller.admin.orderModuleExtra.vo.*;

/**
 * 生产单模块扩充属性表 order_module_extra_N Mapper
 *
 * @author 晨丰科技
 */
@Mapper
public interface OrderModuleExtraMapper extends BaseMapperX<OrderModuleExtraDO> {

    default PageResult<OrderModuleExtraDO> selectPage(OrderModuleExtraPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OrderModuleExtraDO>()
                .eqIfPresent(OrderModuleExtraDO::getOrderNo, reqVO.getOrderNo())
                .eqIfPresent(OrderModuleExtraDO::getRoomId, reqVO.getRoomId())
                .eqIfPresent(OrderModuleExtraDO::getBodyId, reqVO.getBodyId())
                .eqIfPresent(OrderModuleExtraDO::getType, reqVO.getType())
                .eqIfPresent(OrderModuleExtraDO::getExtraData, reqVO.getExtraData())
                .orderByDesc(OrderModuleExtraDO::getId));
    }

}