package com.red.circle.console.adapter.app.user;

import com.red.circle.console.app.dto.clienobject.user.UserDiamondBalanceCO;
import com.red.circle.console.app.dto.clienobject.user.UserDiamondRunWaterCO;
import com.red.circle.console.app.service.app.user.UserDiamondService;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.web.controller.BaseController;
import com.red.circle.wallet.inner.model.cmd.UserDiamondBalanceQryCmd;
import com.red.circle.wallet.inner.model.cmd.UserDiamondRunWaterQryCmd;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户钻石 前端控制器
 * </p>
 *
 * @author pengshigang
 * @since 2023-7-24
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/user/diamond")
public class UserDiamondRestController extends BaseController {

  private final UserDiamondService userDiamondService;

  /**
   * 用户钻石余额列表.
   */
  @GetMapping("/balance/page")
  public PageResult<UserDiamondBalanceCO> pageUserDiamondBalance(
      UserDiamondBalanceQryCmd query) {
    return userDiamondService.pageUserDiamondBalance(query);
  }

  /**
   * 用户钻石流水列表.
   */
  @GetMapping("/run/water/page")
  public PageResult<UserDiamondRunWaterCO> pageUserDiamondRunWater(
      UserDiamondRunWaterQryCmd query) {
    return userDiamondService.pageUserDiamondRunWater(query);
  }

}
