package com.red.circle.game.fruit.application.service.impl;

import com.red.circle.framework.core.dto.PageCommand;
import com.red.circle.game.fruit.application.command.query.GameInfoQryExe;
import com.red.circle.game.fruit.application.command.query.LotteryInfoQryExe;
import com.red.circle.game.fruit.application.command.query.PlayersBetHistoryQryExe;
import com.red.circle.game.fruit.application.command.query.PrizeBetHeatQryExe;
import com.red.circle.game.fruit.application.dto.cmd.TokenQryCmd;
import com.red.circle.game.fruit.application.service.GameInfoService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 游戏数据 服务实现类.
 * </p>
 *
 * @author lisizhe on 2023-11-30 19:17
 */
@Service
@RequiredArgsConstructor
public class GameInfoServiceImpl implements GameInfoService {

  private final GameInfoQryExe gameInfoQryExe;
  private final PrizeBetHeatQryExe prizeBetHeatQryExe;
  private final LotteryInfoQryExe lotteryInfoQryExe;
  private final PlayersBetHistoryQryExe playersBetHistoryQryExe;

  @Override
  public void getGameInfo(TokenQryCmd cmd) {
    gameInfoQryExe.execute(cmd);
  }

  @Override
  public void drawLottery(Long gameId, Long userId) {
    lotteryInfoQryExe.execute(gameId, userId);
  }

  @Override
  public void prizeBetHeat(Long userId) {
    prizeBetHeatQryExe.execute(userId);
  }

  @Override
  public void playersBetHistory(Long lastId, Long userId) {
    playersBetHistoryQryExe.execute(lastId, userId);
  }
}
