package com.red.circle.console.app.service.app.sys;

import com.red.circle.framework.core.asserts.ResponseAssert;
import com.red.circle.other.inner.endpoint.user.user.UserRechargeClient;
import java.util.Set;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 用户充值黑名单
 *
 * @author lisizhe on 2023/11/3
 */

@Service
@RequiredArgsConstructor
public class RechargeBlacklistServiceImpl implements RechargeBlacklistService {

  private final UserRechargeClient userRechargeClient;


  @Override
  public Set<String> getKeys() {
    return ResponseAssert.requiredSuccess(userRechargeClient.getKeys());
  }

  @Override
  public void addRechargeBlack(String userId) {
    ResponseAssert.requiredSuccess(userRechargeClient.addRechargeBlack(userId));
  }

  @Override
  public void delKey(String key) {
    userRechargeClient.delKey(key);
  }

  @Override
  public Boolean checkRechargeBlack(String userId) {
    return ResponseAssert.requiredSuccess(userRechargeClient.checkRechargeBlack(userId));
  }
}
