package com.red.circle.other.app.command.user.query;

import com.red.circle.common.business.dto.cmd.UserIdCmd;
import com.red.circle.common.business.enums.SVIPLevelEnum;
import com.red.circle.other.domain.gateway.user.ability.UserSVipGateway;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 是否为SVip用户.
 * </p>
 *
 * @author pengshigang
 * @since 2022-08-22
 */
@Component
@RequiredArgsConstructor
public class UserSVipCheckQryExe {

  private final UserSVipGateway userSVipGateway;

  public SVIPLevelEnum execute(UserIdCmd cmd) {
    return userSVipGateway.checkSVipIdentity(cmd.getUserId());
  }

}
