Skip to content

Commit

Permalink
feat: 알림 목록 조회 read 필드 추가
Browse files Browse the repository at this point in the history
* feat: 알림 조회 응답 데이터에 read 필드 추가

* test: 알림 조회 Controller 테스트 read 필드 추가

* docs: API 문서 최신화
  • Loading branch information
jjuny0310 authored Nov 16, 2023
1 parent 3ce38a9 commit f26a92c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class GetNotificationElement {
private Long contentId;
private ServiceType serviceType;
private NotificationType notificationType;
private Boolean read;

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createAt;
Expand All @@ -28,6 +29,7 @@ public static GetNotificationElement from(Notification notification) {
.contentId(notification.getContentId())
.serviceType(notification.getServiceType())
.notificationType(notification.getNotificationType())
.read(notification.getRead())
.createAt(notification.getCreatedAt())
.build();
}
Expand Down
91 changes: 49 additions & 42 deletions src/main/resources/static/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ <h4 id="_전체_게시글_목록_조회offset_http_response"><a class="link" hre
"content" : "SSAFY 9기 합격했습니다!!",
"likeCount" : 3,
"commentCount" : 2,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand All @@ -784,7 +784,7 @@ <h4 id="_전체_게시글_목록_조회offset_http_response"><a class="link" hre
"content" : "저도 싸피에서 교육들으면 개발실력 엄청 오르겠죠?",
"likeCount" : 11,
"commentCount" : 29,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -982,7 +982,7 @@ <h4 id="_게시글_목록_조회cursor_http_response"><a class="link" href="#_
"content" : "역시 B형 특강을 열심히 듣는게 맞나요?",
"likeCount" : 5,
"commentCount" : 14,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "익명",
"anonymity" : true,
"thumbnail" : "썸네일 URL"
Expand All @@ -994,7 +994,7 @@ <h4 id="_게시글_목록_조회cursor_http_response"><a class="link" href="#_
"content" : "저도 싸피에서 교육들으면 개발실력 엄청 오르겠죠?",
"likeCount" : 11,
"commentCount" : 29,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -1190,7 +1190,7 @@ <h4 id="_게시글_목록_조회offset_http_response"><a class="link" href="#_
"content" : "역시 B형 특강을 열심히 듣는게 맞나요?",
"likeCount" : 5,
"commentCount" : 14,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "익명",
"anonymity" : true,
"thumbnail" : "썸네일 URL"
Expand All @@ -1202,7 +1202,7 @@ <h4 id="_게시글_목록_조회offset_http_response"><a class="link" href="#_
"content" : "저도 싸피에서 교육들으면 개발실력 엄청 오르겠죠?",
"likeCount" : 11,
"commentCount" : 29,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -1959,7 +1959,7 @@ <h4 id="_전체_게시글_검색offset_http_response"><a class="link" href="#_
"content" : "싸피는 취업 꿈나무를 위한 공간",
"likeCount" : 3,
"commentCount" : 2,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand All @@ -1971,7 +1971,7 @@ <h4 id="_전체_게시글_검색offset_http_response"><a class="link" href="#_
"content" : "저도 싸피에서 교육들으면 개발실력 엄청 오르겠죠?",
"likeCount" : 11,
"commentCount" : 29,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -2173,7 +2173,7 @@ <h4 id="_게시글_검색cursor_http_response"><a class="link" href="#_게시글
"content" : "SSAFY 9기 합격했습니다!!",
"likeCount" : 3,
"commentCount" : 2,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -2373,7 +2373,7 @@ <h4 id="_게시글_검색offset_http_response"><a class="link" href="#_게시글
"content" : "SSAFY 9기 합격했습니다!!",
"likeCount" : 3,
"commentCount" : 2,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -3288,7 +3288,7 @@ <h4 id="_hot_게시글_목록_조회cursor_http_response"><a class="link" href="
"content" : "은 실력입니다.",
"likeCount" : 202,
"commentCount" : 54,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "익명",
"anonymity" : true,
"thumbnail" : "썸네일 URL"
Expand All @@ -3300,7 +3300,7 @@ <h4 id="_hot_게시글_목록_조회cursor_http_response"><a class="link" href="
"content" : "열심히 SSAFY 9기를 수료하시면 취업에 성공하실겁니다.",
"likeCount" : 102,
"commentCount" : 33,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -3492,7 +3492,7 @@ <h4 id="_hot_게시글_목록_조회offset_http_response"><a class="link" href="
"content" : "은 실력입니다.",
"likeCount" : 202,
"commentCount" : 54,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "익명",
"anonymity" : true,
"thumbnail" : "썸네일 URL"
Expand All @@ -3504,7 +3504,7 @@ <h4 id="_hot_게시글_목록_조회offset_http_response"><a class="link" href="
"content" : "열심히 SSAFY 9기를 수료하시면 취업에 성공하실겁니다.",
"likeCount" : 102,
"commentCount" : 33,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -3702,7 +3702,7 @@ <h4 id="_hot_게시글_검색cursor_http_response"><a class="link" href="#_hot_
"content" : "열심히 SSAFY 9기를 수료하시면 취업에 성공하실겁니다.",
"likeCount" : 102,
"commentCount" : 33,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -3898,7 +3898,7 @@ <h4 id="_hot_게시글_검색offset_http_response"><a class="link" href="#_hot_
"content" : "열심히 SSAFY 9기를 수료하시면 취업에 성공하실겁니다.",
"likeCount" : 102,
"commentCount" : 33,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -4100,7 +4100,7 @@ <h4 id="_나의_게시글_목록_조회cursor_http_response"><a class="link" hre
"content" : "열심히 SSAFY 9기를 수료하시면 취업에 성공하실겁니다.",
"likeCount" : 102,
"commentCount" : 33,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand All @@ -4112,7 +4112,7 @@ <h4 id="_나의_게시글_목록_조회cursor_http_response"><a class="link" hre
"content" : "SSAFY 9기 합격했습니다!!",
"likeCount" : 3,
"commentCount" : 2,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -4304,7 +4304,7 @@ <h4 id="_나의_게시글_목록_조회offset_http_response"><a class="link" hre
"content" : "열심히 SSAFY 9기를 수료하시면 취업에 성공하실겁니다.",
"likeCount" : 102,
"commentCount" : 33,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand All @@ -4316,7 +4316,7 @@ <h4 id="_나의_게시글_목록_조회offset_http_response"><a class="link" hre
"content" : "SSAFY 9기 합격했습니다!!",
"likeCount" : 3,
"commentCount" : 2,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -4514,7 +4514,7 @@ <h4 id="_나의_스크랩_게시글_목록_조회cursor_http_response"><a class=
"content" : "역시 B형 특강을 열심히 듣는게 맞나요?",
"likeCount" : 5,
"commentCount" : 14,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "익명",
"anonymity" : true,
"thumbnail" : "썸네일 URL"
Expand All @@ -4526,7 +4526,7 @@ <h4 id="_나의_스크랩_게시글_목록_조회cursor_http_response"><a class=
"content" : "저도 싸피에서 교육들으면 개발실력 엄청 오르겠죠?",
"likeCount" : 11,
"commentCount" : 29,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -4718,7 +4718,7 @@ <h4 id="_나의_스크랩_게시글_목록_조회offset_http_response"><a class=
"content" : "역시 B형 특강을 열심히 듣는게 맞나요?",
"likeCount" : 5,
"commentCount" : 14,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "익명",
"anonymity" : true,
"thumbnail" : "썸네일 URL"
Expand All @@ -4730,7 +4730,7 @@ <h4 id="_나의_스크랩_게시글_목록_조회offset_http_response"><a class=
"content" : "저도 싸피에서 교육들으면 개발실력 엄청 오르겠죠?",
"likeCount" : 11,
"commentCount" : 29,
"createdAt" : "2023-11-14T10:22:36.8501831",
"createdAt" : "2023-11-14T21:22:10.7247036",
"nickname" : "이용준",
"anonymity" : false,
"thumbnail" : "썸네일 URL"
Expand Down Expand Up @@ -4919,7 +4919,7 @@ <h4 id="_댓글_목록_조회_http_response"><a class="link" href="#_댓글_목
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 1283
Content-Length: 1282

{
"code" : "200",
Expand All @@ -4929,7 +4929,7 @@ <h4 id="_댓글_목록_조회_http_response"><a class="link" href="#_댓글_목
"commentId" : 1,
"content" : "반가워요",
"likeCount" : 3,
"createdAt" : "2023-11-14T10:22:36.8441833",
"createdAt" : "2023-11-14T21:22:10.7117156",
"anonymity" : true,
"modified" : false,
"liked" : true,
Expand All @@ -4947,7 +4947,7 @@ <h4 id="_댓글_목록_조회_http_response"><a class="link" href="#_댓글_목
"commentId" : 1,
"content" : "안녕하세요",
"likeCount" : 10,
"createdAt" : "2023-11-14T10:22:36.8431833",
"createdAt" : "2023-11-14T21:22:10.709459",
"anonymity" : false,
"modified" : false,
"liked" : false,
Expand Down Expand Up @@ -6400,8 +6400,8 @@ <h4 id="_로그인_http_response"><a class="link" href="#_로그인_http_respons
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Set-Cookie: accessToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c; Path=/; Domain=ssafsound.com; Max-Age=2629744; Expires=Thu, 14 Dec 2023 11:51:40 GMT; Secure; HttpOnly
Set-Cookie: refreshToken=syJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IsdfserwetweSflKxwRJeSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c; Path=/auth/reissue; Domain=ssafsound.com; Max-Age=2629744; Expires=Thu, 14 Dec 2023 11:51:40 GMT; Secure; HttpOnly
Set-Cookie: accessToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c; Path=/; Domain=ssafsound.com; Max-Age=2629744; Expires=Thu, 14 Dec 2023 22:51:13 GMT; Secure; HttpOnly
Set-Cookie: refreshToken=syJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IsdfserwetweSflKxwRJeSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c; Path=/auth/reissue; Domain=ssafsound.com; Max-Age=2629744; Expires=Thu, 14 Dec 2023 22:51:13 GMT; Secure; HttpOnly
Content-Type: application/json
Content-Length: 422

Expand Down Expand Up @@ -11336,7 +11336,7 @@ <h4 id="_사용자_지원_리크루트_목록_조회cursor_http_response"><a cla
} ],
"mine" : false,
"matchStatus" : "PENDING",
"appliedAt" : "2023-11-14T10:22:39.9826074"
"appliedAt" : "2023-11-14T21:22:15.7465878"
} ],
"nextCursor" : 1,
"isLast" : true
Expand Down Expand Up @@ -11579,7 +11579,7 @@ <h4 id="_사용자_지원_리크루트_목록_조회offset_http_response"><a cla
} ],
"mine" : false,
"matchStatus" : "PENDING",
"appliedAt" : "2023-11-14T10:22:39.9826074"
"appliedAt" : "2023-11-14T21:22:15.7465878"
} ],
"currentPage" : 1,
"totalPageCount" : 1
Expand Down Expand Up @@ -13193,7 +13193,7 @@ <h4 id="_리크루트_참여자_목록_조회_http_response"><a class="link" hre
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 1028
Content-Length: 1029

{
"code" : "200",
Expand All @@ -13204,7 +13204,7 @@ <h4 id="_리크루트_참여자_목록_조회_http_response"><a class="link" hre
"limit" : 4,
"members" : [ {
"recruitApplicationId" : -1,
"joinedAt" : "2023-11-14T10:22:39.965512",
"joinedAt" : "2023-11-14T21:22:15.7217384",
"memberId" : 99,
"nickname" : "KIM",
"isMajor" : true,
Expand All @@ -13220,7 +13220,7 @@ <h4 id="_리크루트_참여자_목록_조회_http_response"><a class="link" hre
"limit" : 3,
"members" : [ {
"recruitApplicationId" : 1,
"joinedAt" : "2023-11-14T10:22:39.9806095",
"joinedAt" : "2023-11-14T21:22:15.7440554",
"memberId" : 99,
"nickname" : "KIM",
"isMajor" : true,
Expand Down Expand Up @@ -13415,7 +13415,7 @@ <h4 id="_등록자_리크루트_참여신청_목록_조회_http_response"><a cla
"reply" : "취업 준비를 위해서 신청하게되었습니다.",
"question" : "프로젝트에 참여하고자 하는 동기가 무엇인가요?",
"liked" : false,
"appliedAt" : "2023-11-14T10:22:39.9786019"
"appliedAt" : "2023-11-14T21:22:15.7409166"
} ]
}
}
Expand Down Expand Up @@ -13754,7 +13754,7 @@ <h4 id="_등록자_리크루트_참여신청_상세_조회_http_response"><a cla
"reply" : "취업 준비를 위해서 신청하게되었습니다.",
"question" : "프로젝트에 참여하고자 하는 동기가 무엇인가요?",
"liked" : false,
"appliedAt" : "2023-11-14T10:22:39.9786019"
"appliedAt" : "2023-11-14T21:22:15.7409166"
}
}</code></pre>
</div>
Expand Down Expand Up @@ -13970,7 +13970,7 @@ <h4 id="_등록자_거절한_리크루트_신청_목록_조회_http_response"><a
"reply" : "취업 준비를 위해서 신청하게되었습니다.",
"question" : "프로젝트에 참여하고자 하는 동기가 무엇인가요?",
"liked" : false,
"appliedAt" : "2023-11-14T10:22:39.9786019"
"appliedAt" : "2023-11-14T21:22:15.7409166"
} ]
}
}</code></pre>
Expand Down Expand Up @@ -14186,7 +14186,7 @@ <h4 id="_사용자_리크루트_신청서_조회_http_response"><a class="link"
"reply" : "취업 준비를 위해서 신청하게되었습니다.",
"question" : "프로젝트에 참여하고자 하는 동기가 무엇인가요?",
"liked" : false,
"appliedAt" : "2023-11-14T10:22:39.9786019"
"appliedAt" : "2023-11-14T21:22:15.7409166"
}
}</code></pre>
</div>
Expand Down Expand Up @@ -14919,7 +14919,7 @@ <h4 id="_리크루트_덧글_목록_조회_http_response"><a class="link" href="
"likeCount" : 0,
"liked" : false,
"mine" : false,
"createdAt" : "2023-11-14T10:22:40.9339658",
"createdAt" : "2023-11-14T21:22:17.2613181",
"deletedComment" : false,
"modified" : false,
"author" : {
Expand Down Expand Up @@ -15351,7 +15351,7 @@ <h4 id="_알림_목록_조회_http_response"><a class="link" href="#_알림_목
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 674
Content-Length: 720

{
"code" : "200",
Expand All @@ -15363,14 +15363,16 @@ <h4 id="_알림_목록_조회_http_response"><a class="link" href="#_알림_목
"contentId" : 2,
"serviceType" : "POST",
"notificationType" : "COMMENT_REPLAY",
"createAt" : "2023-11-14 11:22:39"
"read" : false,
"createAt" : "2023-11-14 22:22:14"
}, {
"notificationId" : 1,
"message" : "'오늘 점심 추천좀' 게시글에 새로운 댓글이 달렸습니다.",
"contentId" : 1,
"serviceType" : "POST",
"notificationType" : "POST_REPLAY",
"createAt" : "2023-11-14 10:22:39"
"read" : false,
"createAt" : "2023-11-14 21:22:14"
} ],
"cursor" : null
}
Expand Down Expand Up @@ -15466,6 +15468,11 @@ <h4 id="_알림_목록_조회_response_fields"><a class="link" href="#_알림_
<td class="tableblock halign-left valign-top"><p class="tableblock">구체적인 알림 타입, SYSTEM | POST_REPLAY | COMMENT_REPLAY | RECRUIT<sub>~</sub> 단, RECRUIT는 추가될 수 있음.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>data.notifications[].read</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Boolean</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">새로 들어온 알림인지 여부, 처음 조회된 알림이면 false</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>data.notifications[].createAt</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>String</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">알림이 저장된 시간, yyyy-MM-dd HH:mm:ss</p></td>
Expand Down
Loading

0 comments on commit f26a92c

Please sign in to comment.