package com.red.circle.order.inner.service.impl;

import com.red.circle.order.infra.database.rds.service.order.OrderPurchaseFriendshipRecordService;
import com.red.circle.order.inner.convertor.OrderPurchaseFriendshipRecordInnerConvertor;
import com.red.circle.order.inner.model.dto.OrderPurchaseFriendshipRecordDTO;
import com.red.circle.order.inner.service.OrderPurchaseFriendshipRecordClientService;
import java.util.List;
import java.util.Set;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 帮朋友购买记录.
 *
 * @author pengliang on 2023/11/3
 */
@Service
@RequiredArgsConstructor
public class OrderPurchaseFriendshipRecordClientServiceImpl implements
    OrderPurchaseFriendshipRecordClientService {

  private final OrderPurchaseFriendshipRecordService orderPurchaseFriendshipRecordService;
  private final OrderPurchaseFriendshipRecordInnerConvertor orderPurchaseFriendshipRecordInnerConvertor;

  @Override
  public List<OrderPurchaseFriendshipRecordDTO> listByOrderIds(Set<Long> orderIds) {
    return orderPurchaseFriendshipRecordInnerConvertor.toListOrderPurchaseFriendshipRecordDTO(
        orderPurchaseFriendshipRecordService.listByOrderIds(orderIds)
    );
  }

}
