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

import com.red.circle.common.business.dto.cmd.app.AppRoomIdCmd;
import com.red.circle.common.business.dto.cmd.app.AppUserIdCmd;
import com.red.circle.other.app.command.material.query.BadgeProgressRateQryExe;
import com.red.circle.other.app.command.material.query.FamilyBadgeQryExe;
import com.red.circle.other.app.command.material.query.RoomBadgeBackpackQryExe;
import com.red.circle.other.app.command.material.query.UserBadgeBackpackTableQryExe;
import com.red.circle.other.app.command.material.query.UserBadgeTableQryExe;
import com.red.circle.other.app.command.material.query.ViewOtherBadgeQryExe;
import com.red.circle.other.app.dto.clientobject.material.BadgeBackpackCO;
import com.red.circle.other.app.dto.clientobject.material.BadgeGroupTableCO;
import com.red.circle.other.app.dto.clientobject.material.BadgeTableCO;
import com.red.circle.other.app.dto.cmd.material.BadgeProgressRateCmd;
import com.red.circle.other.app.dto.cmd.material.UserBadgeQueryCmd;
import com.red.circle.other.app.dto.cmd.material.ViewOtherBadgeQueryCmd;
import java.math.BigDecimal;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 用户徽章 实现.
 *
 * @author pengliang on 2021/3/12
 */
@Service
@RequiredArgsConstructor
public class BadgeServiceImpl implements BadgeService {

  private final FamilyBadgeQryExe familyBadgeQryExe;
  private final UserBadgeTableQryExe userBadgeTableQryExe;
  private final ViewOtherBadgeQryExe viewOtherBadgeQryExe;
  private final BadgeProgressRateQryExe badgeProgressRateQryExe;
  private final RoomBadgeBackpackQryExe roomBadgeBackpackQryExe;
  private final UserBadgeBackpackTableQryExe userBadgeBackpackTableQryExe;

  @Override
  public List<BadgeGroupTableCO> listBadgeTable(UserBadgeQueryCmd cmd) {
    return userBadgeTableQryExe.execute(cmd);
  }

  @Override
  public BigDecimal badgeProgressRate(BadgeProgressRateCmd cmd) {
    return badgeProgressRateQryExe.execute(cmd);
  }

  @Override
  public List<BadgeBackpackCO> listBadgeBackpack(AppUserIdCmd cmd) {
    return userBadgeBackpackTableQryExe.execute(cmd);
  }

  @Override
  public List<BadgeBackpackCO> listRoomBadgeBackpack(AppRoomIdCmd cmd) {
    return roomBadgeBackpackQryExe.execute(cmd);
  }

  @Override
  public List<BadgeGroupTableCO> viewOtherBadge(ViewOtherBadgeQueryCmd cmd) {
    return viewOtherBadgeQryExe.execute(cmd);
  }

  @Override
  public BadgeTableCO getFamilyBadge(AppUserIdCmd cmd) {
    return familyBadgeQryExe.execute(cmd);
  }
}
