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

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.common.business.dto.cmd.UserIdCmd;
import com.red.circle.common.business.enums.SVIPLevelEnum;
import com.red.circle.other.app.command.user.UserSVipExchangeExe;
import com.red.circle.other.app.command.user.query.UserSVipCheckQryExe;
import com.red.circle.other.app.command.user.query.UserSVipProfileQryExe;
import com.red.circle.other.app.dto.clientobject.user.user.UserSVipCO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 用户SVip
 *
 * @author pengshigang on 2022/8/22
 */
@Service
@RequiredArgsConstructor
public class UserSVipServiceImpl implements UserSVipService {

  private final UserSVipExchangeExe userSVipExchangeExe;
  private final UserSVipCheckQryExe userSVipCheckQryExe;
  private final UserSVipProfileQryExe userSVipProfileQryExe;

  @Override
  public SVIPLevelEnum checkUserSVip(UserIdCmd cmd) {
    return userSVipCheckQryExe.execute(cmd);
  }

  @Override
  public UserSVipCO getSVipProfileByUserId(AppExtCommand cmd) {
    return userSVipProfileQryExe.execute(cmd);
  }

  @Override
  public UserSVipCO exchange(AppExtCommand cmd) {
    return userSVipExchangeExe.execute(cmd);
  }
}
