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

import java.util.*;

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

/**
 * 太空舱订单营业额统计 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface StatisticsSpaceCapsuleOrderMapper extends BaseMapperX<StatisticsSpaceCapsuleOrderDO> {

    default PageResult<StatisticsSpaceCapsuleOrderDO> selectPage(StatisticsSpaceCapsuleOrderPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<StatisticsSpaceCapsuleOrderDO>()
                .eqIfPresent(StatisticsSpaceCapsuleOrderDO::getTotalMoney, reqVO.getTotalMoney())
                .eqIfPresent(StatisticsSpaceCapsuleOrderDO::getTotalOrder, reqVO.getTotalOrder())
                .eqIfPresent(StatisticsSpaceCapsuleOrderDO::getTotalMinute, reqVO.getTotalMinute())
                .eqIfPresent(StatisticsSpaceCapsuleOrderDO::getCarteenId, reqVO.getCarteenId())
                .eqIfPresent(StatisticsSpaceCapsuleOrderDO::getRefundMoney, reqVO.getRefundMoney())
                .eqIfPresent(StatisticsSpaceCapsuleOrderDO::getTotalPackageSum, reqVO.getTotalPackageSum())
                .likeIfPresent(StatisticsSpaceCapsuleOrderDO::getCarteenName, reqVO.getCarteenName())
                .betweenIfPresent(StatisticsSpaceCapsuleOrderDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(StatisticsSpaceCapsuleOrderDO::getRemark, reqVO.getRemark())
                .eqIfPresent(StatisticsSpaceCapsuleOrderDO::getTotalCustomer, reqVO.getTotalCustomer())
                .orderByDesc(StatisticsSpaceCapsuleOrderDO::getId));
    }

}