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.GameKtvConfigQryCmd;
import com.red.circle.other.inner.model.dto.game.GameKtvConfigDTO;
import java.util.Map;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


/**
 * <p>
 * ktv歌曲配置信息 服务实现类.
 * </p>
 *
 * @author zongpubin on 2023-05-05 17:18
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class GameKtvConfigServiceImpl implements
    GameKtvConfigService {

  private final GameKtvClient gameKtvClient;

  @Override
  public PageResult<GameKtvConfigDTO> getSongInfo(GameKtvConfigQryCmd query) {
    return ResponseAssert.requiredSuccess(gameKtvClient.getSongInfo(query));
  }

  @Override
  public void addSong(GameKtvConfigDTO param) {
    ResponseAssert.requiredSuccess(gameKtvClient.addSong(param));
  }

  @Override
  public void switchShelfStatus(Long id, Boolean status) {
    ResponseAssert.requiredSuccess(gameKtvClient.switchShelfStatus(id, status));
  }

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

  @Override
  public void updateSong(GameKtvConfigDTO param) {
    ResponseAssert.requiredSuccess(gameKtvClient.updateSong(param));
  }

  @Override
  public Map<Long, String> mapSongName(String sysOrigin) {
    return ResponseAssert.requiredSuccess(gameKtvClient.mapSongName(sysOrigin));
  }
}
