package cn.iocoder.yudao.module.member.dal.mysql.wxstoreorderdetail;

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.member.dal.dataobject.wxstoreorderdetail.WxStoreOrderDetailDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.member.controller.admin.wxstoreorderdetail.vo.*;

/**
 * 微信付款码订单详情 Mapper
 *
 * @author 我是秦俊旗
 */
@Mapper
public interface WxStoreOrderDetailMapper extends BaseMapperX<WxStoreOrderDetailDO> {

    default PageResult<WxStoreOrderDetailDO> selectPage(WxStoreOrderDetailPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WxStoreOrderDetailDO>()
                .eqIfPresent(WxStoreOrderDetailDO::getWxOrderId, reqVO.getWxOrderId())
                .eqIfPresent(WxStoreOrderDetailDO::getGoodsId, reqVO.getGoodsId())
                .likeIfPresent(WxStoreOrderDetailDO::getGoodsName, reqVO.getGoodsName())
                .eqIfPresent(WxStoreOrderDetailDO::getCustomPrice, reqVO.getCustomPrice())
                .eqIfPresent(WxStoreOrderDetailDO::getNumber, reqVO.getNumber())
                .betweenIfPresent(WxStoreOrderDetailDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WxStoreOrderDetailDO::getId));
    }

}