package com.red.circle.other.app.inner.endpoint.activity;

import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.app.inner.service.activity.RoomContributionCountClientService;
import com.red.circle.other.inner.endpoint.activity.api.RoomContributionCountClientApi;
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.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 房间贡献统计.
 *
 * @author pengliang on 2023/11/23
 */
@Validated
@RestController
@RequestMapping(value = RoomContributionCountClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class RoomContributionCountClientEndpoint implements RoomContributionCountClientApi {

  private final RoomContributionCountClientService roomContributionCountClientService;

  @Override
  public ResultResponse<PageResult<RoomContributionCountDTO>> pageOps(
      RoomContributionCountPageQryCmd qryCmd) {
    return ResultResponse.success(roomContributionCountClientService.pageOps(qryCmd));
  }

}
