-
Notifications
You must be signed in to change notification settings - Fork 0
[Refactor] ver 1.3.0 모임방 사용성 개선 작업 #304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
654cab7
58d9d0f
604523b
23eb3d3
22e5a80
948285f
3c89c83
6eeed8a
cf038d1
ca8feae
c987296
0597611
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,9 +25,10 @@ public class JwtUtil { | |
|
|
||
| private final SecretKey secretKey; | ||
|
|
||
| //todo 확정 후 환경변수로 변경 | ||
| private final long tokenExpiredMs = 2592000000L; // 30일 | ||
| private final long signupTokenExpiredMs = 2592000000L; // 30일 | ||
| @Value("${jwt.access-token-expiration}") | ||
| private long tokenExpiredMs; | ||
| @Value("${jwt.signup-token-expiration}") | ||
| private long signupTokenExpiredMs; | ||
hd0rable marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+28
to
+31
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 굿 감사합니다~ |
||
|
|
||
| public JwtUtil(@Value("${jwt.secret}") String secret) { | ||
| secretKey = new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), Jwts.SIG.HS256.key().build().getAlgorithm()); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,15 +15,15 @@ public class RecentSearchCreateManager { | |
| private final RecentSearchQueryPort recentSearchQueryPort; | ||
|
|
||
| public void saveRecentSearchByUser(Long userId, String keyword, RecentSearchType type, boolean isFinalized) { | ||
| // 검색완료일 경우에 최근검색어 추가 | ||
| if (isFinalized) { | ||
| // 동일 조건 (userId + keyword + type) 검색 기록이 이미 있는지 확인 | ||
| recentSearchQueryPort.findRecentSearchByKeywordAndUserId(keyword, userId, type) | ||
| .ifPresentOrElse( | ||
| recentSearchCommandPort::touch, // 있으면 modifiedAt 갱신 | ||
| () -> recentSearchCommandPort.save(RecentSearch.withoutId(keyword, type, userId)) // 없으면 새로 저장 | ||
| ); | ||
| } | ||
| if (!isFinalized) return; // 검색완료일 경우에 최근검색어 추가 | ||
| if (keyword == null || keyword.trim().isEmpty()) return; | ||
| String normalized = keyword.trim(); | ||
|
Comment on lines
+19
to
+20
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 확인했습니다 |
||
|
|
||
| // 동일 조건 (userId + keyword + type) 검색 기록이 이미 있는지 확인 | ||
| recentSearchQueryPort.findRecentSearchByKeywordAndUserId(normalized, userId, type) | ||
| .ifPresentOrElse( | ||
| recentSearchCommandPort::touch, // 있으면 modifiedAt 갱신 | ||
| () -> recentSearchCommandPort.save(RecentSearch.withoutId(normalized, type, userId)) // 없으면 새로 저장 | ||
| ); | ||
hd0rable marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,10 +27,10 @@ public class RoomQueryController { | |
| private final RoomVerifyPasswordUseCase roomVerifyPasswordUseCase; | ||
| private final RoomShowRecruitingDetailViewUseCase roomShowRecruitingDetailViewUseCase; | ||
| private final RoomGetMemberListUseCase roomGetMemberListUseCase; | ||
| private final RoomShowPlayingDetailViewUseCase roomShowPlayingDetailViewUseCase; | ||
| private final RoomShowPlayingOrExpiredDetailViewUseCase roomShowPlayingOrExpiredDetailViewUseCase; | ||
| private final RoomShowMineUseCase roomShowMineUseCase; | ||
| private final RoomGetBookPageUseCase roomGetBookPageUseCase; | ||
| private final RoomGetDeadlinePopularUseCase roomGetDeadlinePopularUsecase; | ||
| private final RoomGetDeadlinePopularRecentUseCase roomGetDeadlinePopularRecentUseCase; | ||
|
|
||
| @Operation( | ||
| summary = "모집중인 방 검색", | ||
|
|
@@ -41,14 +41,15 @@ public class RoomQueryController { | |
| public BaseResponse<RoomSearchResponse> searchRecruitingRooms( | ||
| @Parameter(description = "검색 키워드 (책 이름 or 방 이름)", example = "해리") @RequestParam(value = "keyword", required = false, defaultValue = "") final String keyword, | ||
| @Parameter(description = "모임방 카테고리", example = "문학") @RequestParam(value = "category", required = false, defaultValue = "") final String category, | ||
| @Parameter(description = "전체검색여부 (전체 검색에 해당할때만 true로 보내주세요) ", example = "true") @RequestParam(value = "isAllCategory", required = false, defaultValue = "false") final boolean isAllCategory, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. p3 : 혹시 isAllCategory 라는 request param 은 FE 분들과 사전 상의가 된 네이밍일까요??
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 넵 희용띠니와 상의해서 전체 파라미터를 나타내는 변수로 정했습니다!! |
||
| @Parameter(description = "정렬 방식 (마감 임박 : deadline, 신청 인원 : memberCount)", example = "deadline") @RequestParam("sort") final String sort, | ||
|
Comment on lines
+44
to
45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainisAllCategory 플래그: 파라미터-로직 규칙 명확화 필요 권장 규칙:
서명 변경 검증: 원하시면 유효성 매트릭스(키워드/카테고리/isAllCategory 조합별 동작) 테스트 코드도 작성해 드립니다. Also applies to: 52-52 🏁 Script executed: #!/bin/bash
rg -nP 'RoomSearchQuery\.of\(' -C2Length of output: 570 🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n --hidden -S '\b(class|record|interface)\s+RoomSearchQuery\b' src || true
rg -n --hidden -S 'RoomSearchQuery\.of\(' src || true
files=$(rg -n --hidden -S '\b(class|record|interface)\s+RoomSearchQuery\b' src -l || true)
if [ -n "$files" ]; then
for file in $files; do
echo "---- $file (first 300 lines) ----"
sed -n '1,300p' "$file" || true
done
fiLength of output: 984 isAllCategory 유효성 추가 — RoomSearchQuery.of가 현재 검증을 수행하지 않습니다 확인: src/main/java/konkuk/thip/room/application/port/in/dto/RoomSearchQuery.java의 of(...)는 단순히 레코드 인스턴스만 생성합니다.
🤖 Prompt for AI Agents |
||
| @Parameter(description = "사용자가 검색어 입력을 '확정'했는지 여부 (입력 중: false, 입력 확정: true)", example = "false") @RequestParam(name = "isFinalized") final boolean isFinalized, | ||
| @Parameter(description = "커서 (첫번째 요청시 : null, 다음 요청시 : 이전 요청에서 반환받은 nextCursor 값)") | ||
| @RequestParam(value = "cursor", required = false) final String cursor, | ||
| @Parameter(hidden = true) @UserId final Long userId | ||
| ) { | ||
| return BaseResponse.ok(roomSearchUseCase.searchRecruitingRooms( | ||
| RoomSearchQuery.of(keyword, category, sort, isFinalized, cursor, userId) | ||
| RoomSearchQuery.of(keyword, category, sort, isFinalized, cursor, userId,isAllCategory) | ||
| )); | ||
| } | ||
|
|
||
|
|
@@ -79,7 +80,7 @@ public BaseResponse<RoomRecruitingDetailViewResponse> getRecruitingRoomDetailVie | |
|
|
||
| @Operation( | ||
| summary = "[모임 홈] 참여중인 내 모임방 조회", | ||
| description = "사용자가 참여중인 모임방 목록을 조회합니다." | ||
| description = "사용자가 참여중인 (모집중/진행중인 방) 모임방 목록을 조회합니다." | ||
| ) | ||
| @ExceptionDescription(ROOM_GET_HOME_JOINED_LIST) | ||
| @GetMapping("/rooms/home/joined") | ||
|
|
@@ -105,18 +106,18 @@ public BaseResponse<RoomGetMemberListResponse> getRoomMemberList( | |
| return BaseResponse.ok(roomGetMemberListUseCase.getRoomMemberList(userId, roomId)); | ||
| } | ||
|
|
||
| // 진행중인 방 상세보기 | ||
| // 진행중인/완료된 방 상세보기 | ||
| @Operation( | ||
| summary = "진행중인 방 상세보기", | ||
| description = "진행중인 방의 상세 정보를 조회합니다." | ||
| summary = "진행중인/완료된 방 상세보기", | ||
| description = "진행중인/완료된 방의 상세 정보를 조회합니다." | ||
| ) | ||
| @ExceptionDescription(ROOM_PLAYING_DETAIL) | ||
| @GetMapping("/rooms/{roomId}/playing") | ||
| public BaseResponse<RoomPlayingDetailViewResponse> getPlayingRoomDetailView( | ||
| @ExceptionDescription(ROOM_PLAYING_OR_EXPIRED_DETAIL) | ||
| @GetMapping("/rooms/{roomId}") | ||
| public BaseResponse<RoomPlayingOrExpiredDetailViewResponse> getPlayingOrExpiredRoomDetailView( | ||
| @Parameter(hidden = true) @UserId final Long userId, | ||
| @PathVariable("roomId") final Long roomId | ||
| ) { | ||
| return BaseResponse.ok(roomShowPlayingDetailViewUseCase.getPlayingRoomDetailView(userId, roomId)); | ||
| return BaseResponse.ok(roomShowPlayingOrExpiredDetailViewUseCase.getPlayingOrExpiredRoomDetailView(userId, roomId)); | ||
| } | ||
|
|
||
| // 내 모임방 리스트 조회 | ||
|
|
@@ -148,16 +149,15 @@ public BaseResponse<RoomGetBookPageResponse> getBookPage( | |
| } | ||
|
|
||
| @Operation( | ||
| summary = "마감 임박 및 인기 방 조회", | ||
| description = "카테고리별로 마감 임박 방과 인기 방을 조회합니다." | ||
| summary = "마감 임박/인기 방/최근 생성된 방 조회", | ||
| description = "카테고리별로 마감 임박 방, 인기 방, 최근 생성된 방을 조회합니다." | ||
| ) | ||
| @ExceptionDescription(ROOM_GET_DEADLINE_POPULAR) | ||
| @ExceptionDescription(ROOM_GET_DEADLINE_POPULAR_RECENT) | ||
| @GetMapping("/rooms") | ||
| public BaseResponse<RoomGetDeadlinePopularResponse> getDeadlineAndPopularRoomList( | ||
| public BaseResponse<RoomGetDeadlinePopularRecentResponse> getDeadlineAndPopularAndRecentRoomList( | ||
| @Parameter(description = "카테고리 이름 (default : 문학)", example = "과학/IT") | ||
| @RequestParam(value = "category", defaultValue = "문학") final String category, | ||
| @Parameter(hidden = true) @UserId final Long userId | ||
| @RequestParam(value = "category", defaultValue = "문학") final String category | ||
| ) { | ||
| return BaseResponse.ok(roomGetDeadlinePopularUsecase.getDeadlineAndPopularRoomList(category, userId)); | ||
| return BaseResponse.ok(roomGetDeadlinePopularRecentUseCase.getDeadlineAndPopularAndRecentRoomList(category)); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package konkuk.thip.room.adapter.in.web.response; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public record RoomGetDeadlinePopularRecentResponse( | ||
| List<RoomGetDeadlinePopularRecentDto> deadlineRoomList, | ||
| List<RoomGetDeadlinePopularRecentDto> popularRoomList, | ||
| List<RoomGetDeadlinePopularRecentDto> recentRoomList | ||
| ) { | ||
| public record RoomGetDeadlinePopularRecentDto( | ||
| Long roomId, | ||
| String bookImageUrl, | ||
| String roomName, | ||
| int recruitCount, // 방 최대 인원 수 | ||
| int memberCount, | ||
| String deadlineDate | ||
| ) { | ||
| } | ||
hd0rable marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| public static RoomGetDeadlinePopularRecentResponse of(List<RoomGetDeadlinePopularRecentDto> deadlineRoomList, | ||
| List<RoomGetDeadlinePopularRecentDto> popularRoomList, | ||
| List<RoomGetDeadlinePopularRecentDto> recentRoomList) { | ||
| return new RoomGetDeadlinePopularRecentResponse(deadlineRoomList, popularRoomList, recentRoomList); | ||
| } | ||
| } | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.