package com.ylx.giftCard.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ylx.giftCard.domain.GiftCardOrder;
import com.ylx.giftCard.domain.dto.GiftCardOrderQueryDTO;
import com.ylx.giftCard.domain.dto.UserShoppingFundsDetailQueryDTO;
import com.ylx.giftCard.domain.vo.GiftCardOrderExportVO;
import com.ylx.giftCard.domain.vo.GiftCardOrderPageVO;
import com.ylx.giftCard.domain.vo.UserShoppingFundsDetailItemVO;
import com.ylx.giftCard.domain.vo.UserShoppingFundsSummaryVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GiftCardOrderMapper extends BaseMapper<GiftCardOrder> {

    /**
     * 分页查询后台购物卡订单
     *
     * @param page 分页参数
     * @param dto 查询条件
     * @return 购物卡订单分页列表
     */
    Page<GiftCardOrderPageVO> selectAdminGiftCardOrderPage(
            Page<GiftCardOrderPageVO> page,
            @Param("dto") GiftCardOrderQueryDTO dto);

    /**
     * 查询后台购物卡订单导出列表
     *
     * @param dto 查询条件
     * @return 购物卡订单导出列表
     */
    List<GiftCardOrderExportVO> selectAdminGiftCardOrderExportList(@Param("dto") GiftCardOrderQueryDTO dto);

    /**
     * 查询PC端用户购买购物卡明细
     *
     * @param page 分页参数
     * @param dto 查询条件
     * @return 购买购物卡明细
     */
    Page<UserShoppingFundsDetailItemVO> selectPcPurchaseShoppingFundsDetail(
            Page<UserShoppingFundsDetailItemVO> page,
            @Param("dto") UserShoppingFundsDetailQueryDTO dto);

    /**
     * 查询PC端用户购买购物卡汇总
     *
     * @param dto 查询条件
     * @return 购买购物卡汇总
     */
    UserShoppingFundsSummaryVO selectPcPurchaseShoppingFundsSummary(@Param("dto") UserShoppingFundsDetailQueryDTO dto);
}
