编辑用户名,改为当前月允许修改5次

This commit is contained in:
2025-01-08 14:20:12 +08:00
parent 9f37cb3f8d
commit e4936a23bc
7 changed files with 41 additions and 23 deletions

View File

@@ -292,4 +292,12 @@ public class RedisUtil {
String key = AFFILIATE_LINK_VIEW_KEY + accountId;
return redisTemplate.opsForValue().increment(key, 0);
}
public void batchDeleteKeysWithSamePrefix(String prefix){
Set<String> keys = redisTemplate.keys(prefix + "*");
assert keys != null;
if (!keys.isEmpty()){
redisTemplate.delete(keys);
}
}
}