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

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.common.business.dto.cmd.app.AppRoomIdCmd;
import com.red.circle.other.app.command.activity.RoomContributionActivityReceiveAwardCmdExe;
import com.red.circle.other.app.command.activity.query.RoomContributionActivityQueryCmdExe;
import com.red.circle.other.app.dto.clientobject.activity.RoomContributionCountCO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 房间贡献活动.
 * </p>
 *
 * @author pengshigang
 * @since 2022-10-27
 */
@Service
@RequiredArgsConstructor
public class RoomContributionActivityServiceImpl implements RoomContributionActivityService {

  private final RoomContributionActivityQueryCmdExe roomContributionActivityQueryCmdExe;
  private final RoomContributionActivityReceiveAwardCmdExe roomContributionActivityReceiveAwardCmdExe;

  @Override
  public RoomContributionCountCO getRoomContribution(AppRoomIdCmd cmd) {
    return roomContributionActivityQueryCmdExe.execute(cmd);
  }

  @Override
  public void receive(AppExtCommand cmd) {
    roomContributionActivityReceiveAwardCmdExe.execute(cmd);
  }

}
