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

import com.red.circle.order.infra.database.rds.service.product.ProductConfigPackageService;
import com.red.circle.order.infra.database.rds.service.product.ProductConfigService;
import com.red.circle.order.inner.model.dto.ProductConfigDTO;
import com.red.circle.order.inner.model.dto.ProductConfigPackageDTO;
import com.red.circle.order.inner.service.ProductClientService;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 产品信息.
 *
 * @author lisizhe on 2023/9/13
 */
@Service
@RequiredArgsConstructor
public class ProductClientServiceImpl implements ProductClientService {

  private final ProductConfigService productConfigService;
  private final ProductConfigPackageService productConfigPackageService;

  @Override
  public Map<String, ProductConfigDTO> mapByProductIds(String sysOrigin, Boolean isAndroid,
      Set<String> productIds) {
    return productConfigService.mapByProductIds(sysOrigin, isAndroid, productIds);
  }

  @Override
  public Map<Long, List<ProductConfigPackageDTO>> mapByProductCnfId(Set<Long> productCnfIds) {
    return productConfigPackageService.mapByProductCnfId(productCnfIds);
  }
}
