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

import com.red.circle.common.business.dto.cmd.PageUserIdCmd;
import com.red.circle.console.app.dto.clienobject.game.GameDataStatisticalCO;
import com.red.circle.console.app.dto.clienobject.game.PageGameUserDaysCO;
import com.red.circle.console.app.service.app.game.GameFruitHistoryService;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.web.controller.BaseController;
import com.red.circle.game.fruit.inner.model.cmd.GameDataStatisticalCmd;
import com.red.circle.game.fruit.inner.model.cmd.PageDaysRecordQryCmd;
import com.red.circle.game.fruit.inner.model.dto.DaysRecordDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 摩天轮游戏历史记录相关 前端控制器.
 *
 * @author lisizhe on 2023-12-13
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/game/fruit/history")
public class GameFruitHistoryRestController extends BaseController {

  private final GameFruitHistoryService gameFruitHistoryService;

  @GetMapping("/pageGameFruitDaysRecord")
  public DaysRecordDTO pageGameFruitDaysRecord(PageDaysRecordQryCmd cmd) {
    return gameFruitHistoryService.pageGameFruitDaysRecord(cmd);
  }

  @GetMapping("/pageUserBetRecord")
  public GameDataStatisticalCO pageUserBetRecord(GameDataStatisticalCmd cmd) {
    return gameFruitHistoryService.pageUserBetRecord(cmd);
  }


  @GetMapping("/pageDaysUserData")
  public PageResult<PageGameUserDaysCO> pageDaysUserData(PageUserIdCmd cmd) {
    return gameFruitHistoryService.pageDaysUserData(cmd);
  }
}
