敏感词删除
This commit is contained in:
@@ -283,6 +283,19 @@ public class RedisService {
|
||||
return redisTemplate.opsForSet().members(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 判断Set中是否存在指定元素
|
||||
* @param key String 键
|
||||
* @param value Object 元素
|
||||
* @return boolean 是否存在
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
public boolean sIsMember(String key, Object value) {
|
||||
Boolean result = redisTemplate.opsForSet().isMember(key, value);
|
||||
return result != null && result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取Set集合大小(等价于Redis的SCARD)
|
||||
* @param key String 键
|
||||
|
||||
Reference in New Issue
Block a user