package com.jeesharp.business.modules.finance.payrefund.mapper;

import com.jeesharp.business.modules.finance.payrefund.entity.PayRefundOrder;
import com.jeesharp.business.modules.finance.payrefund.vo.PayRefundOrderQueryVO;
import com.jeesharp.framework.mybatis.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * 支付退款单 Mapper；自定义 SQL 见同包 {@code xml/PayRefundOrderMapper.xml}。
 *
 * @author jeesharp
 * @since 2026-06-11
 */
@Mapper
public interface PayRefundOrderMapper extends BaseMapper<PayRefundOrder, PayRefundOrderQueryVO> {

    PayRefundOrder getByOutRefundNo(@Param("outRefundNo") String outRefundNo);

    BigDecimal sumSuccessRefundAmountByMallOrderId(@Param("mallOrderId") String mallOrderId);

    PayRefundOrder findActiveByAfterSaleId(@Param("afterSaleId") String afterSaleId);
}
