package com.xunwang.payment.service;

import com.xunwang.payment.entity.Refund;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 退款表 服务类
 * </p>
 *
 * @author Long
 * @since 2023-02-26
 */
public interface RefundService extends IService<Refund> {

    /**
     * 根据订单号创建退款订单
     * @param orderNo
     * @param reason
     * @return
     */
    Refund createRefundByOrderNo(String orderNo, String reason);

    /**
     * 记录退款记录
     * @param content
     */
    void updateRefund(String content);

    /**
     * 获取minutes分钟前未退款成功的订单
     * @param minutes
     * @return
     */
    List<Refund> getNoRefundOrderByDuration(int minutes);
}
