package com.red.circle.other.app.service.game;

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.other.app.command.game.egg.GameEggAwardListExe;
import com.red.circle.other.app.command.game.egg.GameEggExchangeAwardExe;
import com.red.circle.other.app.command.game.egg.GameEggListExe;
import com.red.circle.other.app.command.game.egg.GameEggLotteryExe;
import com.red.circle.other.app.command.game.egg.GameEggLotteryRecordExe;
import com.red.circle.other.app.command.game.egg.GameEggMyShardExe;
import com.red.circle.other.app.dto.clientobject.game.GameEggLotteryRecordCO;
import com.red.circle.other.app.dto.clientobject.game.GameEggMyBaseCO;
import com.red.circle.other.app.dto.clientobject.game.GameEggRewardCO;
import com.red.circle.other.app.dto.clientobject.game.GameUserCO;
import com.red.circle.other.app.dto.cmd.game.GameEggExchangeCmd;
import com.red.circle.other.app.dto.cmd.game.GameEggLotteryCmd;
import com.red.circle.other.app.dto.cmd.game.GameEggLotteryPageCmd;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 砸金蛋 .
 * </p>
 *
 * @author pengshigang
 * @since 2021-11-15
 */
@Service
@RequiredArgsConstructor
public class GameEggServiceImpl implements GameEggService {

  private final GameEggListExe gameEggListExe;
  private final GameEggLotteryExe gameEggLotteryExe;
  private final GameEggMyShardExe gameEggMyShardExe;
  private final GameEggAwardListExe gameEggAwardListExe;
  private final GameEggLotteryRecordExe gameEggLotteryRecordExe;
  private final GameEggExchangeAwardExe gameEggExchangeAwardExe;

  @Override
  public List<GameEggRewardCO> awardList(AppExtCommand cmd) {
    return gameEggAwardListExe.execute(cmd);
  }

  @Override
  public List<GameUserCO> leaderboard(AppExtCommand cmd) {
    return gameEggListExe.execute(cmd);
  }

  @Override
  public GameEggMyBaseCO myShred(AppExtCommand cmd) {
    return gameEggMyShardExe.execute(cmd);
  }

  @Override
  public Long exchangeAward(GameEggExchangeCmd cmd) {
    return gameEggExchangeAwardExe.execute(cmd);
  }

  @Override
  public List<GameEggRewardCO> lottery(GameEggLotteryCmd cmd) {
    return gameEggLotteryExe.execute(cmd);
  }

  @Override
  public List<GameEggLotteryRecordCO> myLotteryRecord(GameEggLotteryPageCmd cmd) {
    return gameEggLotteryRecordExe.execute(cmd);
  }
}
