package com.hai.openApi.service;

import com.alibaba.fastjson.JSONObject;
import com.hai.entity.ApiOrder;

import java.util.List;
import java.util.Map;


/**
 * @Author Sum1Dream
 * @Name orderService
 * @Description // 订单业务
 * @Date 17:43 2023/2/28
 * @Param
 * @Return
 */
public interface ApiOrderService {

    /**
     * @Author Sum1Dream
     * @Name createOrder
     * @Description // 创建订单
     * @Date 17:44 2023/2/28
     * @Param [object]
     * @Return void
     */
    ApiOrder createOrder(JSONObject object) throws Exception;


    /**
     * @Author Sum1Dream
     * @Name payOrder
     * @Description // 订单支付
     * @Date 17:44 2023/2/28
     * @Param [object]
     * @Return void
     */
    ApiOrder payOrder(JSONObject object) throws Exception;

    /**
     * @Author Sum1Dream
     * @Name getOrderByMap
     * @Description // 查询订单
     * @Date 17:49 2023/2/28
     * @Param [map]
     * @Return com.hai.entity.ApiOrder
     */
    List<ApiOrder> getOrderByMap(Map<String , Object> map);

    /**
     * @Author Sum1Dream
     * @Name findByOrderNo
     * @Description // 根据订单号查询订单
     * @Date 20:40 2023/3/1
     * @Param [mchOrderNo, orderNo]
     * @Return com.hai.entity.ApiOrder
     */
    ApiOrder findByOrderNo(String mchOrderNo , String orderNo);

    /**
     * @Author Sum1Dream
     * @Name refund
     * @Description // 退款
     * @Date 16:24 2023/5/4
     * @Param [orderNo]
     * @Return void
     */
    void refund(String orderNo);
}
