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

import com.jeesharp.business.modules.member.api.MemberPointsOrderApi;
import com.jeesharp.business.modules.member.api.dto.MemberPointsBizOrderDTO;
import com.jeesharp.business.modules.member.application.MemberPointsOrderApplicationService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * {@link MemberPointsOrderApi} 实现，委托 {@link MemberPointsOrderApplicationService}。
 *
 * @author jeesharp
 * @since 2026-06-24
 */
@Service
@AllArgsConstructor
public class MemberPointsOrderApiImpl implements MemberPointsOrderApi {

    private final MemberPointsOrderApplicationService memberPointsOrderApplicationService;

    @Override
    public void onOrderPaid(String bizScene, String bizOrderId) {
        memberPointsOrderApplicationService.onOrderPaid(bizScene, bizOrderId);
    }

    @Override
    public void onOrderPaid(MemberPointsBizOrderDTO orderDto) {
        memberPointsOrderApplicationService.onOrderPaid(orderDto);
    }

    @Override
    public void onOrderRefunded(String bizScene, String bizOrderId) {
        memberPointsOrderApplicationService.onOrderRefunded(bizScene, bizOrderId);
    }
}
