package com.red.circle.other.app.inner.service.material.gift.impl;

import com.red.circle.other.app.inner.convertor.activity.GiftCountAnchorDailyInnerConvertor;
import com.red.circle.other.app.inner.service.material.gift.GiftCountAnchorDailyClientService;
import com.red.circle.other.infra.database.mongo.service.gift.GiftCountAnchorDailyRunningWaterService;
import com.red.circle.other.inner.model.dto.material.GiftCountAnchorDailyRunningWaterDTO;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 统计主播每日赠送流水 实现.
 *
 * @author pengliang on 2023/8/18
 */
@Service
@RequiredArgsConstructor
public class GiftCountAnchorDailyClientServiceImpl implements GiftCountAnchorDailyClientService {

  private final GiftCountAnchorDailyInnerConvertor giftCountAnchorDailyInnerConvertor;
  private final GiftCountAnchorDailyRunningWaterService giftCountAnchorDailyRunningWaterService;

  @Override
  public List<GiftCountAnchorDailyRunningWaterDTO> listThisMonth(Long userId) {
    return giftCountAnchorDailyInnerConvertor.toListGiftCountAnchorDailyRunningWaterDTO(
        giftCountAnchorDailyRunningWaterService.listThisMonth(userId));
  }

  @Override
  public void deleteByTime(Long sendUserId, Integer startDateNumber, Integer endDateNumber) {
    giftCountAnchorDailyRunningWaterService.deleteByTime(sendUserId, startDateNumber,
        endDateNumber);
  }

  @Override
  public void removeByIds(List<String> ids) {
    giftCountAnchorDailyRunningWaterService.removeByIds(ids);
  }

  @Override
  public List<GiftCountAnchorDailyRunningWaterDTO> listByMonthByAcceptAnchor(Long sendUserId,
      Integer startDateNumber, Integer endDateNumber) {
    return giftCountAnchorDailyInnerConvertor.toListGiftCountAnchorDailyRunningWaterDTO(
        giftCountAnchorDailyRunningWaterService.listByMonthByAcceptAnchor(sendUserId,
            startDateNumber, endDateNumber));
  }

}
