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.other.inner.endpoint.game.GameKtvClient;
import com.red.circle.other.inner.model.cmd.game.GameKtvGiftConfigQryCmd;
import com.red.circle.other.inner.model.dto.game.GameKtvGiftConfigDTO;
import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * <p>
 * ktv礼物配置信息 服务实现类.
 * </p>
 *
 * @author zongpubin on 2023-05-05 18:06
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class GameKtvGiftConfigServiceImpl implements
    GameKtvGiftConfigService {

  private final GameKtvClient gameKtvClient;

  @Override
  public PageResult<GameKtvGiftConfigDTO> getSongGiftInfo(GameKtvGiftConfigQryCmd query) {
    return ResponseAssert.requiredSuccess(gameKtvClient.getSongGiftInfo(query));
  }


  @Override
  public void addSongGift(GameKtvGiftConfigDTO param) {
    ResponseAssert.requiredSuccess(
        gameKtvClient.addSongGift(param));
  }


  @Override
  public void updateSongGift(GameKtvGiftConfigDTO param) {
    ResponseAssert.requiredSuccess(
        gameKtvClient.updateSongGift(param));
  }


  @Override
  public void deleteSongGift(Long id, Long updateUser) {
    ResponseAssert.requiredSuccess(
        gameKtvClient.deleteSongGift(id, updateUser));
  }

  @Override
  public List<GameKtvGiftConfigDTO> listByCondition(GameKtvGiftConfigQryCmd query) {
    return ResponseAssert.requiredSuccess(gameKtvClient.listByCondition(query));
  }
}
