package com.jeesharp.business.modules.pay.application.api;

import com.jeesharp.business.modules.pay.api.PayProfitSharingReturnChannelApi;
import com.jeesharp.business.modules.pay.profitsharing.dto.PayProfitSharingReturnRequestDTO;
import com.jeesharp.business.modules.pay.profitsharing.dto.PayProfitSharingReturnResultDTO;
import com.jeesharp.business.modules.pay.profitsharing.support.PayWechatProfitSharingReturnClient;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * {@link PayProfitSharingReturnChannelApi} 实现，委托微信 V3 分账回退客户端。
 *
 * @author jeesharp
 * @since 2026-06-11
 */
@Service
@AllArgsConstructor
public class PayProfitSharingReturnChannelApiImpl implements PayProfitSharingReturnChannelApi {

    private final PayWechatProfitSharingReturnClient payWechatProfitSharingReturnClient;

    @Override
    public PayProfitSharingReturnResultDTO applyReturn(PayProfitSharingReturnRequestDTO request) {
        return payWechatProfitSharingReturnClient.applyReturn(request);
    }

    @Override
    public PayProfitSharingReturnResultDTO queryByOutReturnNo(String platformTenantId, String subMchId,
            String outReturnNo) {
        return payWechatProfitSharingReturnClient.queryByOutReturnNo(platformTenantId, subMchId, outReturnNo);
    }
}
