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


import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.common.business.dto.cmd.IdLongCmd;
import com.red.circle.common.business.dto.cmd.LastIdCmd;
import com.red.circle.other.app.command.game.luckygift.LuckyGiftDataQryCmd;
import com.red.circle.other.app.command.game.luckygift.LuckyGiftMultipleRuleQryCmd;
import com.red.circle.other.app.command.game.luckygift.LuckyGiftUserIncrDelCmd;
import com.red.circle.other.app.command.game.luckygift.LuckyGiftUserQryCmd;
import com.red.circle.other.app.dto.clientobject.game.GameLuckyGiftDataCO;
import com.red.circle.other.app.dto.clientobject.game.GameLuckyGiftMultipleRuleCO;
import com.red.circle.other.app.dto.clientobject.game.GameLuckyGiftUserCO;
import com.red.circle.other.app.dto.cmd.game.GameLuckyGiftCmd;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 幸运礼物 .
 * </p>
 *
 * @author pengshigang
 * @since 2022-5-27
 */
@Service
@RequiredArgsConstructor
public class GameLuckyGiftServiceImpl implements GameLuckyGiftService {

  private final LuckyGiftDataQryCmd luckyGiftDataQryCmd;
  private final LuckyGiftUserQryCmd luckyGiftUserQryCmd;
  private final LuckyGiftUserIncrDelCmd luckyGiftUserIncrDelCmd;
  private final LuckyGiftMultipleRuleQryCmd luckyGiftMultipleRuleQryCmd;

  @Override
  public void delUserGiftIncrCount(AppExtCommand cmd) {
    luckyGiftUserIncrDelCmd.execute(cmd);
  }

  @Override
  public GameLuckyGiftDataCO getGiftCount(GameLuckyGiftCmd cmd) {
    return luckyGiftDataQryCmd.execute(cmd);
  }

  @Override
  public GameLuckyGiftMultipleRuleCO getGiftMultipleRule(IdLongCmd cmd) {
    return luckyGiftMultipleRuleQryCmd.execute(cmd);
  }

  @Override
  public List<GameLuckyGiftUserCO> listUser(LastIdCmd cmd) {
    return luckyGiftUserQryCmd.execute(cmd);
  }

}
