package com.hai.service;

import com.alibaba.fastjson.JSONObject;
import com.hai.entity.HighUserCard;
import com.hai.entity.OutRechargeChildOrder;
import com.hai.entity.OutRechargeOrder;
import com.hai.model.OrderCountModel;
import com.hai.model.OutOrderModel;
import com.hai.model.OutRechargeOrderModel;
import com.hai.model.OutUserOrderModel;
import io.swagger.models.auth.In;

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

public interface OutRechargeOrderService {

    /**
     * @Author Sum1Dream
     * @Description // 查询充值订单
     * @Date 15:18 2021/6/11
     * @Param [map]
     * @return java.util.List<com.hai.entity.OutRechargeOrder>
     **/
    List<OutRechargeOrder> getListRechargeOrder(Map<String , Object> map);

    /**
     * @Author Sum1Dream
     * @Description // 根据订单ID查询订单
     * @Date 15:19 2021/6/11
     * @Param [orderId]
     * @return com.hai.entity.OutRechargeOrder
     **/
    OutRechargeOrder findByOrderId(Long orderId);

    /**
     * @Author Sum1Dream
     * @Description // 根据订单号查询订单
     * @Date 15:20 2021/6/11
     * @Param [orderNo]
     * @return com.hai.entity.OutRechargeOrder
     **/
    OutRechargeOrder findByOrderNo(String orderNo);

    /***
     * @Author Sum1Dream
     * @Description // 新增订单
     * @Date 15:25 2021/6/11
     * @Param [outRechargeOrder]
     * @return void
     **/
    OutRechargeOrder insertOrder(JSONObject object) throws Exception;

    /***
     * @Author Sum1Dream
     * @Description // 修改订单
     * @Date 15:26 2021/6/11
     * @Param [outRechargeOrder]
     * @return void
     **/
    void updateOrder(OutRechargeOrder outRechargeOrder);

    void updateOrderList(List<OutRechargeOrder> rechargeOrders) throws Exception;

    /**
     * @Author Sum1Dream
     * @Description //取消订单 Administrator
     * @Date 18:37 2021/6/12
     * @Param [orderId]
     * @return void
     **/
    void cancelOrder(Long orderId);

    /**
     * @Author Sum1Dream
     * @Description //完成订单 Administrator
     * @Date 10:10 2021/6/14
     * @Param [orderId]
     * @return void
     **/
    void finishOrder(Long orderId);

    /**
     * 查询订单统计
     * @param map
     * @return
     */
    List<OutRechargeOrderModel> getOrderCount(Map<String,Object> map) throws Exception;

    /**
     * @Author Sum1Dream
     * @Description //查询订单未支付数量 Administrator
     * @Date 10:53 2021/6/14
     * @Param []
     * @return java.lang.Integer
     **/
    Long CountOrder();

    /**
     * @Author Sum1Dream
     * @Description //TODO Administrator
     * @Date 1:04 2021/6/22
     * @Param [map]
     * @return java.util.List<com.hai.model.OutRechargeOrderModel>
     **/
    List<OutOrderModel> getListOrderCount(Map<String , String> map)  throws Exception;

    /**
     * @Author Sum1Dream
     * @Description //TODO Administrator
     * @Date 0:56 2021/6/23
     * @Param [map]
     * @return java.util.List<com.hai.model.OutUserOrderModel>
     **/
    List<OutUserOrderModel> getUserCountList(Map<String , String> map)  throws Exception;

    /**
    * @Author Sum1Dream
    * @name hltUnionCardPay.java
    * @Description // 汇联通支付
    * @Date 17:21 2022/5/25
    * @Param [java.lang.Long, com.hai.entity.OutRechargeOrder]
    * @return void
    */
    void hltUnionCardPay(HighUserCard userCard, OutRechargeOrder order) throws Exception;


    /**
    * @Author Sum1Dream
    * @name getOutRechargeOrderList.java
    * @Description // 查询话费充值超过15分钟订单
    * @Date 3:34 下午 2021/12/10
    * @Param []
    * @return java.util.List<com.hai.entity.OutRechargeOrder>
    */
    List<OutRechargeOrder> getOutRechargeOrderList();

    /**
    * @Author Sum1Dream
    * @name rechargeOrderByIndex.java
    * @Description // 话费订单统计
    * @Date 4:25 下午 2022/1/10
    * @Param [java.lang.Integer]
    * @return com.hai.model.OrderCountModel
    */
    OrderCountModel rechargeOrderByIndex(Integer code);

    /**
    * @Author Sum1Dream
    * @name orderToRefund.java
    * @Description // 话费订单退款
    * @Date 4:44 下午 2022/1/24
    * @Param [java.lang.Long]
    * @return void
    */
    void rechargeOrderToRefund(Long orderId) throws Exception;

    /**
    * @Author Sum1Dream
    * @name pollRequest.java
    * @Description // 充值轮询
    * @Date 16:32 2022/5/25
    * @Param [com.hai.entity.OutRechargeOrder]
    * @return void
    */
    void pollRequest(OutRechargeOrder outRechargeOrder) throws Exception;

    /**
    * @Author Sum1Dream
    * @name rechargeOrderNum.java
    * @Description // 查询充值订单待支付数量
    * @Date 17:49 2022/5/30
    * @Param [java.lang.Long]
    * @return java.lang.Integer
    */
    Integer rechargeOrderNum(Long userId);


}
