package com.red.circle.wallet.inner.endpoint.diamond;

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.wallet.inner.endpoint.diamond.api.DiamondBalanceClientApi;
import com.red.circle.wallet.inner.endpoint.diamond.api.DiamondRunningWaterClientApi;
import com.red.circle.wallet.inner.model.dto.DiamondRunningWaterDTO;
import com.red.circle.wallet.inner.service.diamond.DiamondRunningWaterClientService;
import java.util.List;
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/12/27
 */
@Validated
@RestController
@RequestMapping(value = DiamondBalanceClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class DiamondRunningWaterClientEndpoint implements DiamondRunningWaterClientApi {

  private final DiamondRunningWaterClientService diamondRunningWaterClientService;


  @Override
  public ResultResponse<List<DiamondRunningWaterDTO>> listUserLatestOneMonths(Long userId, Integer type,
      Integer size, Long lastId) {
    return ResultResponse.success(diamondRunningWaterClientService.listUserLatestOneMonths(userId, type, size, lastId));
  }

}
