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

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.common.business.dto.cmd.app.AppUserIdCmd;
import com.red.circle.other.app.command.gift.BlessingsGiftGiveCmdExe;
import com.red.circle.other.app.command.gift.GiftGiveAwayBatchCmdExe;
import com.red.circle.other.app.command.gift.GiveAwayGiftBackpackCmdExe;
import com.red.circle.other.app.command.gift.LuckyGiftGiveCmdExe;
import com.red.circle.other.app.command.gift.query.ActivityGiftListQryExe;
import com.red.circle.other.app.command.gift.query.PremiumGiftWallListQryExe;
import com.red.circle.other.app.command.gift.query.SysGiftConfigListQryExe;
import com.red.circle.other.app.command.gift.query.UserGiftBackpackQryExe;
import com.red.circle.other.app.command.gift.query.UserGiftWallListQryExe;
import com.red.circle.other.app.dto.clientobject.gift.ActivityGiftCO;
import com.red.circle.other.app.dto.clientobject.gift.GiftConfigCO;
import com.red.circle.other.app.dto.clientobject.gift.GiftWallCO;
import com.red.circle.other.app.dto.clientobject.gift.PremiumGiftWallCO;
import com.red.circle.other.app.dto.clientobject.gift.UserGiftBackpackCO;
import com.red.circle.other.app.dto.cmd.gift.GiveAwayGiftBackpackCmd;
import com.red.circle.other.app.dto.cmd.gift.GiveAwayGiftBatchCmd;
import java.math.BigDecimal;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author pengliang on 2020/11/18
 */
@Service
@RequiredArgsConstructor
public class GiftServiceImpl implements GiftService {

  private final LuckyGiftGiveCmdExe luckyGiftGiveCmdExe;
  private final UserGiftWallListQryExe userGiftWallListQryExe;
  private final UserGiftBackpackQryExe userGiftBackpackQryExe;
  private final GiftGiveAwayBatchCmdExe giftGiveAwayBatchCmdExe;
  private final SysGiftConfigListQryExe sysGiftConfigListQryExe;
  private final PremiumGiftWallListQryExe premiumGiftWallListQryExe;
  private final GiveAwayGiftBackpackCmdExe giveAwayGiftBackpackCmdExe;
  private final BlessingsGiftGiveCmdExe blessingsGiftGiveCmdExe;
  private final ActivityGiftListQryExe activityGiftListQryExe;

  @Override
  public List<GiftConfigCO> listSysOriginEffectiveAllGift(AppExtCommand cmd) {
    return sysGiftConfigListQryExe.execute(cmd);
  }

  @Override
  public List<UserGiftBackpackCO> listUserGiftBackpack(AppExtCommand cmd) {
    return userGiftBackpackQryExe.execute(cmd);
  }

  @Override
  public void giveAwayGiftBackpack(GiveAwayGiftBackpackCmd cmd) {
    giveAwayGiftBackpackCmdExe.execute(cmd);
  }

  @Override
  public BigDecimal giveAwayGiftBatch(GiveAwayGiftBatchCmd cmd) {
    return giftGiveAwayBatchCmdExe.execute(cmd);
  }

  @Override
  public BigDecimal giveLuckyGift(GiveAwayGiftBatchCmd cmd) {
    return luckyGiftGiveCmdExe.execute(cmd);
  }

  @Override
  public List<GiftWallCO> listUserGiftWall(AppUserIdCmd cmd) {
    return userGiftWallListQryExe.execute(cmd);
  }

  @Override
  public List<PremiumGiftWallCO> listPremiumGiftWallCO(AppExtCommand cmd) {
    return premiumGiftWallListQryExe.execute(cmd);
  }

  @Override
  public BigDecimal giveBlessingsGift(GiveAwayGiftBatchCmd cmd) {
    return blessingsGiftGiveCmdExe.execute(cmd);
  }

  @Override
  public List<ActivityGiftCO> listActivityGifts(AppExtCommand cmd) {
    return activityGiftListQryExe.execute(cmd);
  }

}
