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.AppIdLongCmd;
import com.red.circle.other.app.command.activity.CpRewardReceiveCmdExe;
import com.red.circle.other.app.command.activity.query.CpRewardReceiveQueryExe;
import com.red.circle.other.app.dto.clientobject.activity.CpActivityCO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * cp 相关活动.
 *
 * @author pengliang on 2021/7/16
 */
@Service
@RequiredArgsConstructor
public class CpRewardServiceImpl implements CpRewardService {

  private final CpRewardReceiveCmdExe cpRewardReceiveCmdExe;
  private final CpRewardReceiveQueryExe cpRewardReceiveQueryExe;

  @Override
  public CpActivityCO getReward(AppExtCommand cmd) {
    return cpRewardReceiveQueryExe.execute(cmd);
  }

  @Override
  public void receive(AppIdLongCmd cmd) {
    cpRewardReceiveCmdExe.execute(cmd);
  }
}
