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.ActivityAgentAnchorCountRewardCmdExe;
import com.red.circle.other.app.command.activity.ActivityAgentAnchorReceiveCmdExe;
import com.red.circle.other.app.command.activity.ActivityAgentMonthTargetRewardCmdExe;
import com.red.circle.other.app.command.activity.ActivityAnchorDayTargetRewardCmdExe;
import com.red.circle.other.app.command.activity.ActivityAnchorMonthTargetRewardCmdExe;
import com.red.circle.other.app.dto.clientobject.activity.ActivityAgentAnchorContentCO;
import com.red.circle.other.inner.enums.task.ReceiveStatusEnum;
import com.red.circle.other.inner.model.dto.activity.props.ActivityRewardProps;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.tuple.ImmutableTriple;
import org.springframework.stereotype.Service;

/**
 * cp 相关活动.
 *
 * @author pengshigang on 2023/2/13
 */
@Service
@RequiredArgsConstructor
public class ActivityAgentAnchorServiceImpl implements ActivityAgentAnchorService {

  private final ActivityAgentAnchorReceiveCmdExe activityAgentAnchorReceiveCmdExe;
  private final ActivityAnchorDayTargetRewardCmdExe activityAnchorDayTargetRewardCmdExe;
  private final ActivityAgentMonthTargetRewardCmdExe activityAgentMonthTargetRewardCmdExe;
  private final ActivityAgentAnchorCountRewardCmdExe activityAgentAnchorCountRewardCmdExe;
  private final ActivityAnchorMonthTargetRewardCmdExe activityAnchorMonthTargetRewardCmdExe;


  @Override
  public ImmutableTriple<Long, List<ImmutableTriple<ReceiveStatusEnum,
      ActivityAgentAnchorContentCO, List<ActivityRewardProps>>>, Long> getAgentMonthTargetReward(
      AppExtCommand cmd) {
    return activityAgentMonthTargetRewardCmdExe.execute(cmd);
  }

  @Override
  public ImmutableTriple<Long, List<ImmutableTriple<ReceiveStatusEnum,
      ActivityAgentAnchorContentCO, List<ActivityRewardProps>>>, Long> getAgentAnchorCountReward(
      AppExtCommand cmd) {
    return activityAgentAnchorCountRewardCmdExe.execute(cmd);
  }

  @Override
  public ImmutableTriple<Long, List<ImmutableTriple<ReceiveStatusEnum,
      ActivityAgentAnchorContentCO, List<ActivityRewardProps>>>, Long> getAnchorDayTargetReward(
      AppExtCommand cmd) {
    return activityAnchorDayTargetRewardCmdExe.execute(cmd);
  }

  @Override
  public ImmutableTriple<Long, List<ImmutableTriple<ReceiveStatusEnum,
      ActivityAgentAnchorContentCO, List<ActivityRewardProps>>>, Long> getAnchorMonthTargetReward(
      AppExtCommand cmd) {
    return activityAnchorMonthTargetRewardCmdExe.execute(cmd);
  }

  @Override
  public void receiveAgentAnchor(AppIdLongCmd cmd) {

    activityAgentAnchorReceiveCmdExe.execute(cmd);
  }


}
