package com.red.circle.other.app.inner.service.activity.impl;

import com.red.circle.framework.dto.PageResult;
import com.red.circle.other.app.inner.convertor.activity.RoomContributionCountInnerConvertor;
import com.red.circle.other.app.inner.service.activity.RoomContributionCountClientService;
import com.red.circle.other.infra.database.mongo.service.live.RoomContributionCountService;
import com.red.circle.other.inner.model.cmd.live.RoomContributionCountPageQryCmd;
import com.red.circle.other.inner.model.dto.activity.RoomContributionCountDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 房间贡献统计.
 *
 * @author pengliang on 2023/11/23
 */
@Service
@RequiredArgsConstructor
public class RoomContributionCountClientServiceImpl implements RoomContributionCountClientService {

  private final RoomContributionCountService roomContributionCountService;
  private final RoomContributionCountInnerConvertor roomContributionCountInnerConvertor;

  @Override
  public PageResult<RoomContributionCountDTO> pageOps(RoomContributionCountPageQryCmd qryCmd) {
    return roomContributionCountInnerConvertor.toPageRoomContributionCountDTO(
        roomContributionCountService.pageOps(qryCmd)
    );
  }

}
