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

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.other.app.command.room.RoomThemeSwitchUseCmdExe;
import com.red.circle.other.app.command.room.RoomThemeUseCustomizeThemeCmdExe;
import com.red.circle.other.app.command.room.query.RoomThemeUserBackpackListQryExe;
import com.red.circle.other.app.command.room.query.UserLatestCustomizeThemeQryExe;
import com.red.circle.other.app.dto.clientobject.room.RoomThemeCO;
import com.red.circle.other.app.dto.clientobject.room.RoomThemeUserUserCustomizeCO;
import com.red.circle.other.app.dto.cmd.room.RoomThemeCustomizeCmd;
import com.red.circle.other.app.dto.cmd.room.SwitchUseThemeCmd;
import java.math.BigDecimal;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author houyong on 2020/12/9
 * @since pengliang on 2023/9/21
 */
@Service
@RequiredArgsConstructor
public class RoomThemeServiceImpl implements RoomThemeService {

  private final RoomThemeSwitchUseCmdExe roomThemeSwitchUseCmdExe;
  private final UserLatestCustomizeThemeQryExe userLatestCustomizeThemeQryExe;
  private final RoomThemeUserBackpackListQryExe roomThemeUserBackpackListQryExe;
  private final RoomThemeUseCustomizeThemeCmdExe roomThemeUseCustomizeThemeCmdExe;

  @Override
  public List<RoomThemeCO> listMeThemeBackpack(AppExtCommand cmd) {
    return roomThemeUserBackpackListQryExe.execute(cmd);
  }

  @Override
  public void switchUseTheme(SwitchUseThemeCmd cmd) {
    roomThemeSwitchUseCmdExe.execute(cmd);
  }

  @Override
  public BigDecimal customizeTheme(RoomThemeCustomizeCmd cmd) {
    return roomThemeUseCustomizeThemeCmdExe.execute(cmd);
  }

  @Override
  public RoomThemeUserUserCustomizeCO getLatestCustomize(AppExtCommand cmd) {
    return userLatestCustomizeThemeQryExe.execute(cmd);
  }

}
