package com.fdkankan.platform.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fdkankan.platform.goods.vo.ResponseGoods;
import com.fdkankan.platform.goods.vo.ResponseGoodsSku;
import com.fdkankan.platform.order.entity.Order;
import com.fdkankan.platform.order.request.RequestPlaceOrder;
import com.fdkankan.platform.order.vo.ResponseCommerceOrder;
import com.fdkankan.platform.order.vo.ResponseExpansionOrder;
import com.fdkankan.platform.user.request.*;
import com.fdkankan.platform.user.vo.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author 
 * @since 2021-12-24
 */
public interface IOrderService extends IService<Order> {

    ResponseOrder getOrderDetail(Long orderId);

    Page<ResponseOrder> getOrders(RequestOrder param, String token);

    String cancelOrder(RequestOrder param, String token);

    String receiptOrder(RequestOrder param, String token);

    ResponseInvoice getInvoiceDetail(RequestOrder param, String token);

    ResponseOrder placeOrder(RequestPlaceOrder param, String token);

    ResponseVirtualOrder rechargeOrder(RequestCamera param, String token);

    ResponseExpansionOrder expansionOrder(RequestExpansionOrder param, String token);

    ResponseCommerceOrder commerceOrder(RequestCommerceOrder param, String token);

    ResponseIncrementOrder incrementOrder(RequestIncrementOrder param, String token);

    ResponseDownloadOrder downloadOrder(RequestIncrementOrder param, String token);

    Boolean queryOrderStatus(RequestVirtualOrder param, String token) throws Exception;

    ResponseGoods getExpansionPrice(RequestCamera param, String token);

    ResponseGoodsSku getIncrementOrDownloadPrice(RequestCamera param, String token);

    Order getByOrderSn(String orderSn);

    boolean paySuccessEntityOrder(String orderSn, String tradeNo, int paymentTypeName);

    Integer queryOrderCountByToday();

    BigDecimal queryTurnoverByToday();

    BigDecimal queryTurnoverByMonth();

    BigDecimal queryTurnoverByLastMonth();

    Integer queryAllPayOrdersCount();

    BigDecimal queryAllTurnoverByOrder();

    Integer queryOrderCountByShippingStatus(String unshipped);

    List<ResponseOrder> queryTrendOrder();

    Page<ResponseOrder> getPageVoByParam(RequestOrder param);

    String confirmOrderDelivery(RequestOrder param) throws Exception;
}
