package com.fzm.mall.server.front.order.service;

import com.fzm.mall.server.front.asset.model.po.qo.OrderQO;
import com.fzm.mall.server.front.asset.model.vo.order.OrderVO;
import com.fzm.mall.server.front.base.PageVO;
import com.fzm.mall.server.front.order.model.Order;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fzm.mall.server.front.order.model.OrderDetail;
import com.fzm.mall.server.front.order.model.po.NftOrderPo;
import com.fzm.mall.server.front.order.model.po.PreSaleOrderVo;
import com.fzm.mall.server.front.order.model.vo.OrderBlindBoxVo;
import com.fzm.mall.server.front.order.model.vo.OrderVo;
import com.fzm.mall.server.front.order.model.vo.ReturnMoneyDetail;

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

/**
 * <p>
 * 用户购物订单表 服务类
 * </p>
 *
 * @author fzm
 * @since 2021-03-02
 */
public interface IOrderService extends IService<Order> {
    Order order(final String oid);

    OrderVO orderVO(final String oid);

    void buildOrderVO(OrderVO orderVO);

    PageVO<OrderVO> pageOrderVO(final OrderQO orderQO);

    PageVO<OrderVO> pageAfterSaleOrderVO(final OrderQO orderQO);

    void process(String oid);

    List<OrderDetail> listOrderDetail(final String oid);

    String createOrder(String uid, OrderVo orderVo, Integer type);

    void handle(Object oid);

    void close(Object oid);

    int applyReturn(String uid, String oid);

    int revokeReturn(String uid, String oid);

    ReturnMoneyDetail getReturnMoneyDetail(String oid);

    Integer getCountByUidAndOid(String uid, String orderId);

    String createPreSaleOrder(String uid, PreSaleOrderVo preSaleOrderVo);

    String createNftOrder(String uid, List<NftOrderPo> nftOrderPos);

    /**
     * 盲盒下单
     * @param uid
     * @param type
     * @param orderVo
     * @return
     */
    String blindBoxCreateOrder(String uid, Integer type, OrderBlindBoxVo orderVo);
}
