Skip to content

Commit

Permalink
Merge pull request #132 from chanu2/main
Browse files Browse the repository at this point in the history
🎨: ChatRedisCacheService 주석 제거
  • Loading branch information
GeonHui2 authored Oct 30, 2023
2 parents 65e6c1a + 6e79ae2 commit b94d8cb
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ohsoontaxi.backend.domain.chat.service;



import jakarta.annotation.PostConstruct;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -42,7 +41,6 @@ public class ChatRedisCacheService {

private final ChatUtils chatUtils;
public static final String NEW_CHAT = "NEW_CHAT";
public static final String OUT_USER = "탈퇴한 회원";
public static final String USERNAME_PROFILE = "USERNAME_PROFILE";

private final RedisTemplate<String, Object> redisTemplate;
Expand Down Expand Up @@ -95,8 +93,6 @@ public ChatResponse getChatsFromRedis(Long reservationId, ChatPagingRequest chat
//마지막 chat_data cursor Rank 조회
Long rank = zSetOperations.reverseRank(CHAT_SORTED_SET_ + reservationId, cursorDto);

log.info("rank={}",rank);

//Cursor 없을 경우 -> 최신채팅 조회
if (rank == null)
rank = 0L;
Expand Down Expand Up @@ -141,19 +137,13 @@ public void cachingDBDataToRedis(Chat chat) {

public String findProfileById(String userId) {

log.info("userId={}",userId);

String profile = (String) roomRedisTemplate.opsForHash().get(USERNAME_PROFILE, userId);

log.info("profile={}",profile);

if (profile != null)
return profile;

User user = userUtils.getUserById(Long.valueOf(userId));

log.info("email={}",userId);

roomRedisTemplate.opsForHash().put(USERNAME_PROFILE, userId, user.getProfilePath());

return user.getProfilePath();
Expand Down

0 comments on commit b94d8cb

Please sign in to comment.