fix: 处理首屏返回空的问题

This commit is contained in:
Tim
2025-09-17 11:41:35 +08:00
parent 6db969cc4d
commit 6f968d16aa
4 changed files with 7 additions and 10 deletions

View File

@@ -49,9 +49,9 @@ public class UserVisitService {
.orElseThrow(() -> new com.openisle.exception.NotFoundException("User not found"));
// 如果缓存存在就返回
String key1 = CachingConfig.VISIT_CACHE_NAME + ":"+LocalDate.now()+":count:"+username;
String key1 = CachingConfig.VISIT_CACHE_NAME + ":" +LocalDate.now() + ":count:" + username;
Integer cached = (Integer) redisTemplate.opsForValue().get(key1);
if(cached != null){
if (cached != null){
return cached.longValue();
}