Skip to content

Feature - userId 해싱#156

Open
JiwonHwang01 wants to merge 7 commits into
mainfrom
feature/userIdHashing
Open

Feature - userId 해싱#156
JiwonHwang01 wants to merge 7 commits into
mainfrom
feature/userIdHashing

Conversation

@JiwonHwang01
Copy link
Copy Markdown
Contributor

Description

유저 Id hashing 처리

Related Issues

Changes Made

  1. MeetService - updatePayments
  2. JwtService - createToken, extractUserId
  3. ChatDto, ChatHistoryController, ChatController

Testing

로그인 테스트가 필요해서 dev에 merge합니다.

Checklist

  • 코드가 정상적으로 컴파일되는지 확인했습니다.
  • 모든 테스트가 성공적으로 통과했습니다.
  • 관련 문서를 업데이트했습니다.
  • PR이 관련 이슈를 정확히 참조하고 있습니다.
  • 코드 스타일 가이드라인을 준수했습니다.
  • 코드 리뷰어를 지정했습니다.

@JiwonHwang01 JiwonHwang01 added the Feature 새로운 기능 label Apr 4, 2025
@JiwonHwang01 JiwonHwang01 requested a review from duckchanahn April 4, 2025 10:37
@JiwonHwang01 JiwonHwang01 self-assigned this Apr 4, 2025
@JiwonHwang01 JiwonHwang01 linked an issue Apr 4, 2025 that may be closed by this pull request
@duckchanahn duckchanahn requested a review from Copilot April 7, 2025 06:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/main/java/org/ktb/modie/service/MeetService.java:328

  • [nitpick] The variable 'targetUserId' holds the decoded user id; consider renaming it to something like 'decodedUserId' for enhanced clarity.
String targetUserId = String.valueOf(hashIdUtil.decode(request.userId()));

src/main/java/org/ktb/modie/presentation/v1/controller/ChatHistoryController.java:84

  • The 'hashIdUtil' is used here without being declared or injected in this controller; please ensure it is properly initialized.
String userHashId = hashIdUtil.encode(Long.parseLong(user.getUserId()));

Copy link
Copy Markdown
Member

@duckchanahn duckchanahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일부 댓글만 확인해주세요 !

private final MeetRepository meetRepository; // MeetRepository 추가
private final HashIdUtil hashIdUtil;

// 생성자 수정: MeetRepository도 주입받도록 수정
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주석 지우기 !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주석 지웠습니다 감삼당!

HttpServletRequest request) {

Long meetId = hashIdUtil.decode(meetHashId);
System.out.println("getChatHistory start !! ");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

출력문 지우기 !

chatList = chatRepository.findTop25ByMeetIdOrderByCreatedAtDesc(meetId, pageable);
} else {
chatList = chatRepository.findByMeetIdAndMessageIdLessThanOrderByCreatedAtDesc(meetId, lastChatId,
pageable);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

120자를 초과해서 줄을 띄워야할 때 파라미터를 모두 한 줄에 두면 더 보기 쉬울 거 같습니다 ! pageable만 다른 줄이 아닌 meetId도 다른 줄에 있도록 !

@JiwonHwang01 JiwonHwang01 requested a review from duckchanahn April 7, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature 새로운 기능

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: userId 해싱

3 participants