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

import com.jeesharp.business.modules.finance.api.MemberInvoiceApplyApi;
import com.jeesharp.business.modules.finance.invoice.application.MemberInvoiceApplyApplicationService;
import com.jeesharp.business.modules.finance.invoice.dto.MemberInvoiceApplyCreateDTO;
import com.jeesharp.business.modules.finance.invoice.vo.MemberInvoiceApplyResultVO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

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

    private final MemberInvoiceApplyApplicationService memberInvoiceApplyApplicationService;

    @Override
    public MemberInvoiceApplyResultVO create(String memberId, MemberInvoiceApplyCreateDTO dto) {
        return memberInvoiceApplyApplicationService.create(memberId, dto);
    }

    @Override
    public MemberInvoiceApplyResultVO getResult(String id) {
        return memberInvoiceApplyApplicationService.getResult(id);
    }

    @Override
    public MemberInvoiceApplyResultVO getLatestByOrder(String memberId, String orderId) {
        return memberInvoiceApplyApplicationService.getLatestByOrder(memberId, orderId);
    }

    @Override
    public List<MemberInvoiceApplyResultVO> listByMember(String memberId, String status) {
        return memberInvoiceApplyApplicationService.listByMember(memberId, status);
    }
}
