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

import com.red.circle.other.infra.database.cache.service.user.UserRechargeBlackCacheService;
import com.red.circle.other.app.inner.service.user.user.UserRechargeClientService;
import java.util.Set;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 用户充值
 *
 * @author lisizhe on 2023/11/2
 */
@Service
@RequiredArgsConstructor
public class UserRechargeClientServiceImpl implements UserRechargeClientService {

  private final UserRechargeBlackCacheService userRechargeBlackCacheService;

  @Override
  public Set<String> getKeys() {
    return userRechargeBlackCacheService.getKeys();
  }

  @Override
  public void addRechargeBlack(String userId) {
    userRechargeBlackCacheService.addRechargeBlack(userId);
  }

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

  @Override
  public Boolean checkRechargeBlack(String userId) {
    return userRechargeBlackCacheService.checkRechargeBlack(userId);
  }
}
