package com.red.circle.order.inner.endpoint;

import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.order.inner.endpoint.api.TotalRechargeUserClientApi;
import com.red.circle.order.inner.model.cmd.QualityUserPageTableQry;
import com.red.circle.order.inner.model.dto.TotalRechargeUserDTO;
import com.red.circle.order.inner.service.TotalRechargeUserClientService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
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 2024/1/23
 */
@Slf4j
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping(value = TotalRechargeUserClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
public class TotalRechargeUserClientEndpoint implements TotalRechargeUserClientApi {

  private final TotalRechargeUserClientService totalRechargeUserClientService;

  @Override
  public ResultResponse<PageResult<TotalRechargeUserDTO>> opsPageQuery(
      QualityUserPageTableQry qry) {
    return ResultResponse.success(totalRechargeUserClientService.opsPageQuery(qry));
  }

}
