package com.xhpc.payment.mapper;

import com.xhpc.common.domain.XhpcRechargeOrder;
import com.xhpc.common.domain.XhpcRefundOrder;
import com.xhpc.payment.domain.XhpcRefundOriginalOrder;
import org.apache.ibatis.annotations.Param;

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

/**
 * @author yuyang
 * @date 2023-08-23 9:36
 */
public interface XhpcRefundOriginalOrderMapper {

    //查询是否满足退款条件
    Map<String, Object> compareTotalTimeMoney(@Param("refundOrderId")Long refundOrderId, @Param("startTime")String startTime, @Param("endTime")String endTime);

    Map<String, Object> compareTotalMoney(@Param("userId")Long userId,@Param("source") Integer source);
    //查询以前充值记录
    List<XhpcRechargeOrder> getTotalMoneyList(@Param("userId")Long userId,@Param("source") Integer source,@Param("createTime")String createTime);
    //查询支付宝充值订单
    List<XhpcRechargeOrder> getXhpcRechargeOrderList(@Param("type")Integer type,@Param("refundOrderId")Long refundOrderId, @Param("startTime")String startTime, @Param("endTime")String endTime);

    XhpcRefundOrder getXhpcRefundOrder(@Param("refundOrderId")Long refundOrderId);

    XhpcRechargeOrder getXhpcRechargeOrder(@Param("rechargeOrderId")Long rechargeOrderId);

    void addXhpcRefundOriginalOrder(XhpcRefundOriginalOrder xhpcRefundOriginalOrder);

    XhpcRefundOriginalOrder getXhpcRefundOriginalOrderRefundId(@Param("refundId")String refundId);

    void updateXhpcRefundOriginalOrder(XhpcRefundOriginalOrder xhpcRefundOriginalOrder);

    int addXhpcRefundOrder(XhpcRefundOrder xhpcRefundOrder);

    void updateRechargeOrderRefundStatus(@Param("userId")Long userId,@Param("source")Integer source);

    List<Map<String,Object>> getRefundOriginalOrderList(@Param("refundOrderId")Long refundOrderId);

}
