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

import com.red.circle.game.fruit.application.command.GameFruitReceiveTaskAwardExe;
import com.red.circle.game.fruit.application.command.GameFruitTaskOpenBoxExe;
import com.red.circle.game.fruit.application.command.query.GameFruitReceiveUserQryExe;
import com.red.circle.game.fruit.application.command.query.GameFruitTaskBoxQryExe;
import com.red.circle.game.fruit.application.command.query.GameFruitTaskQryExe;
import com.red.circle.game.fruit.application.command.query.GameFruitTodayPlayTimesQryExe;
import com.red.circle.game.fruit.application.dto.cmd.GameFruitOpenBoxCmd;
import com.red.circle.game.fruit.application.dto.cmd.GameFruitReceiveTaskAwardCmd;
import com.red.circle.game.fruit.application.service.GameFruitTaskService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 游戏任务服务
 *
 * @author zongpubin on 2023/12/12
 */
@Service
@RequiredArgsConstructor
public class GameFruitTaskServiceImpl implements GameFruitTaskService {

  private final GameFruitTaskQryExe gameFruitTaskQryExe;
  private final GameFruitTaskBoxQryExe gameFruitTaskBoxQryExe;
  private final GameFruitTaskOpenBoxExe gameFruitTaskOpenBoxExe;
  private final GameFruitReceiveUserQryExe gameFruitReceiveUserQryExe;
  private final GameFruitReceiveTaskAwardExe gameFruitReceiveTaskAwardExe;
  private final GameFruitTodayPlayTimesQryExe gameFruitTodayPlayTimesQryExe;


  @Override
  public void boxRewards(Long userId) {
    gameFruitTaskBoxQryExe.execute(userId);
  }

  @Override
  public void openBox(GameFruitOpenBoxCmd cmd) {
    gameFruitTaskOpenBoxExe.execute(cmd);
  }

  @Override
  public void gameTimes(Long userId) {
    gameFruitTodayPlayTimesQryExe.execute(userId);
  }

  @Override
  public void gameTaskInfo(Long userId) {
    gameFruitTaskQryExe.execute(userId);
  }

  @Override
  public void gameFruitReceiveUser(Long userId) {
    gameFruitReceiveUserQryExe.execute(userId);
  }

  @Override
  public void gameFruitReceiveTaskAward(GameFruitReceiveTaskAwardCmd cmd) {
    gameFruitReceiveTaskAwardExe.execute(cmd);
  }
}
