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

import com.jeesharp.business.modules.finance.api.PayRecordApi;
import com.jeesharp.business.modules.finance.paymentrecord.application.PayRecordApplicationService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * {@link PayRecordApi} 实现，委托 {@link PayRecordApplicationService}。
 *
 * @author jeesharp
 * @since 2026-06-13
 */
@Service
@AllArgsConstructor
public class PayRecordApiImpl implements PayRecordApi {

    private final PayRecordApplicationService payRecordApplicationService;

    @Override
    public void recordWechatJsapiNotifyIfAbsent(String bizSceneCode, String bizOrderId, String merchantOrderNo,
            String thirdPartyTradeNo, BigDecimal payAmountYuan, String subject, String memberId,
            LocalDateTime paySuccessTime, String rawCallbackBody) {
        payRecordApplicationService.recordWechatJsapiNotifyIfAbsent(
                bizSceneCode, bizOrderId, merchantOrderNo, thirdPartyTradeNo,
                payAmountYuan, subject, memberId, paySuccessTime, rawCallbackBody);
    }
}
