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

import com.red.circle.framework.core.asserts.ResponseAssert;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.game.fruit.inner.endpoint.GameFruitTaskClient;
import com.red.circle.game.fruit.inner.model.cmd.GameFruitBountyConfigQryCmd;
import com.red.circle.game.fruit.inner.model.cmd.GameFruitTaskConfigQryCmd;
import com.red.circle.game.fruit.inner.model.dto.GameFruitAwardPictureDTO;
import com.red.circle.game.fruit.inner.model.dto.GameFruitBountyConfigDTO;
import com.red.circle.game.fruit.inner.model.dto.GameFruitTaskConfigDTO;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 摩天轮游戏赏金任务配置服务
 *
 * @author zongpubin on 2023/12/13
 */
@Service
@RequiredArgsConstructor
public class GameFruitTaskConfigServiceImpl implements GameFruitTaskConfigService {

  private final GameFruitTaskClient gameFruitTaskClient;


  @Override
  public PageResult<GameFruitBountyConfigDTO> getGameFruitBountyConfig(
      GameFruitBountyConfigQryCmd query) {
    return ResponseAssert.requiredSuccess(gameFruitTaskClient.getGameFruitBountyConfig(query));
  }

  @Override
  public void addGameFruitBountyConfig(GameFruitBountyConfigDTO param) {
    ResponseAssert.requiredSuccess(gameFruitTaskClient.addGameFruitBountyConfig(param));
  }

  @Override
  public void deleteGameFruitBountyConfig(Long id) {
    ResponseAssert.requiredSuccess(gameFruitTaskClient.deleteGameFruitBountyConfig(id));
  }

  @Override
  public PageResult<GameFruitTaskConfigDTO> getGameFruitTaskConfig(
      GameFruitTaskConfigQryCmd query) {
    return ResponseAssert.requiredSuccess(gameFruitTaskClient.getGameFruitTaskConfig(query));
  }

  @Override
  public void addGameFruitTaskConfig(GameFruitTaskConfigDTO param) {
    ResponseAssert.requiredSuccess(gameFruitTaskClient.addGameFruitTaskConfig(param));

  }

  @Override
  public void deleteGameFruitTaskConfig(Long id) {
    ResponseAssert.requiredSuccess(gameFruitTaskClient.deleteGameFruitTaskConfig(id));

  }

  @Override
  public List<GameFruitAwardPictureDTO> getGameFruitImages(String sysOrigin) {
    return ResponseAssert.requiredSuccess(gameFruitTaskClient.getGameFruitImages(sysOrigin));
  }
}
