package com.ylx.giftCard.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyV3Result;
import com.ylx.common.core.domain.model.WxLoginUser;
import com.ylx.giftCard.domain.GiftCard;
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.UserShoppingFundsDetailVO;
import com.ylx.massage.domain.TWxUser;

import java.util.List;

public interface IGiftCardOrderService extends IService<GiftCardOrder> {

    GiftCardOrder buildOrder(GiftCard card, Integer quantity, String merchantId, WxLoginUser wxLoginUser);

    void cancelOrder(Long id);

    void processGiftCardPayment(WxPayOrderNotifyV3Result.DecryptNotifyResult result, TWxUser wxUser, GiftCardOrder cardOrder);

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

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

    /**
     * 查询PC端用户购物金明细
     *
     * @param page 分页参数
     * @param dto 查询条件
     * @return 用户购物金明细
     */
    UserShoppingFundsDetailVO getPcUserShoppingFundsDetail(Page<UserShoppingFundsDetailItemVO> page,
                                                           UserShoppingFundsDetailQueryDTO dto);
}
