package com.zanxiang.game.module.manage.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zanxiang.game.module.manage.pojo.params.OrderParam;
import com.zanxiang.game.module.manage.pojo.params.UserOrderListParam;
import com.zanxiang.game.module.manage.pojo.vo.OrderListVO;
import com.zanxiang.game.module.manage.pojo.vo.UserOrderListVO;
import com.zanxiang.game.module.mybatis.entity.Order;
import jakarta.servlet.http.HttpServletResponse;

/**
 * @author : lingfeng
 * @time : 2022-07-05
 * @description : 用户订单
 */
public interface IOrderService extends IService<Order> {

    /**
     * 获取用户下单记录
     *
     * @param param : 参数
     * @return {@link IPage}<{@link UserOrderListVO}>
     */
    IPage<UserOrderListVO> orderList(UserOrderListParam param);

    /**
     * 订单列表查询
     *
     * @param param : 查询参数
     * @return {@link OrderListVO}
     */
    OrderListVO orderList(OrderParam param);

    /**
     * 订单excel下载
     *
     * @param param    参数
     * @param response 响应
     */
    void getOrderExcel(OrderParam param, HttpServletResponse response);

    /**
     * 叫cp
     *
     * @param orderId 订单id
     * @param payKey  支付关键
     * @return {@link Boolean}
     */
    Boolean callCp(String orderId, String payKey);
}
