package com.ruoyi.ss.refund.service;

import com.ruoyi.common.domain.vo.LocalDateDecimalVO;
import com.ruoyi.dashboard.domain.dto.BillDailyAmountQuery;
import com.ruoyi.ss.refund.domain.Refund;
import com.ruoyi.ss.refund.domain.RefundQuery;
import com.ruoyi.ss.refund.domain.RefundVO;

import java.util.List;

/**
 * 退款订单Service接口
 *
 * @author ruoyi
 * @date 2024-07-09
 */
public interface RefundService
{
    /**
     * 查询退款订单
     *
     * @param refundId 退款订单主键
     * @return 退款订单
     */
    public RefundVO selectRefundByRefundId(Long refundId);

    /**
     * 查询退款订单列表
     *
     * @param refund 退款订单
     * @return 退款订单集合
     */
    public List<RefundVO> selectRefundList(RefundQuery refund);

    /**
     * 新增退款订单
     *
     * @param refund 退款订单
     * @return 结果
     */
    public int insertRefund(Refund refund);

    /**
     * 修改退款订单
     *
     * @param refund 退款订单
     * @return 结果
     */
    public int updateRefund(Refund refund);

    /**
     * 批量删除退款订单
     *
     * @param refundIds 需要删除的退款订单主键集合
     * @return 结果
     */
    public int deleteRefundByRefundIds(Long[] refundIds);

    /**
     * 删除退款订单信息
     *
     * @param refundId 退款订单主键
     * @return 结果
     */
    public int deleteRefundByRefundId(Long refundId);

    /**
     * 查询退款订单
     */
    RefundVO selectRefundByRefundNo(String refundNo);

    RefundVO selectOne(RefundQuery query);

    /**
     * 退款成功后操作
     */
    void handleRefundSuccess(String refundNo);

    /**
     * 条件更新
     */
    int updateByQuery(Refund data, RefundQuery query);

    /**
     * 创建退款并发起退款
     */
    int createRefund(Refund refund);

    /**
     * 刷新退款结果
     */
    int refreshResult(Long refundId);

    /**
     * 刷新退款结果
     */
    int refreshResult(RefundVO refund);

    /**
     * 统计退款金额
     */
    List<LocalDateDecimalVO> selectDailyAmount(RefundQuery query);
}
