package com.miaxis.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.miaxis.order.domain.OrderInfo;
import com.miaxis.order.dto.QuerySchoolOrderListDTO;
import com.miaxis.order.vo.OrderIncomeVo;
import com.miaxis.order.vo.QuerySchoolOrderDetailedVo;
import com.miaxis.order.vo.QuerySchoolOrderListVo;
import com.miaxis.wx.domain.WxJsOrder;

import java.util.List;

/**
 * 订单信息Service接口
 *
 * @author miaxis
 * @date 2022-06-01
 */
public interface IOrderInfoService extends IService<OrderInfo> {
    /**
     * 查询订单信息列表
     *
     * @param orderInfo 订单信息
     * @return 订单信息集合
     */
    List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);

    OrderInfo getByOutTradeNo(String outTradeNo);

    void writeVipDataToDb(WxJsOrder order, int payType);

    void writeExamDataToDb(WxJsOrder order, int payType);

    void writeVipDataToDb(String goodsName, Long userId, String userName, String outTrandeNo, Integer total, Integer payType);

    List<QuerySchoolOrderListVo> selectSchoolOrderInfoList(QuerySchoolOrderListDTO schoolOrderListDTO);

    void refundOrder(WxJsOrder order);

    List<OrderInfo> selectSchoolOrderDetailed(QuerySchoolOrderListDTO schoolOrderListDTO);

    List<QuerySchoolOrderDetailedVo> selectSchoolOrderDetailedExcel(QuerySchoolOrderListDTO schoolOrderListDTO);

    Integer getTotalMoney(QuerySchoolOrderListDTO orderInfo);

    Integer getCommissionMoney(QuerySchoolOrderListDTO orderInfo);

    List<QuerySchoolOrderListVo> selectSchoolOrderInfoExcel(QuerySchoolOrderListDTO schoolOrderListDTO);

    List<OrderIncomeVo> getIncomeList(QuerySchoolOrderListDTO schoolOrderListDTO);
}
