Feat:CHAT-152-BE-api-월별-일기-리스트-조회 #24
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
요약 (Summary)
변경 사항 (Changes)
DiaryInquiryController 클래스 추가
TagInfoDTO 클래스 추가 (순환 참조 오류 발생으로 tag DTO도 작성)(llegalStateException: Cannot call sendError() after the response has been committed 오류)
DiaryInquiryRepository 클래스 수정
DiaryInquiryService 클래스 수정
리뷰 요구사항
확인 방법 (선택)
포스트맨을 통해 확인가능합니다.
쿼리는 다인님 다이어리 상세 PR에 있는 쿼리를 변형해서 이용하였습니다.
SELECT * FROM chatdiary.chat;
INSERT INTO member (email, password, create_at, update_at)
VALUES ("aa@aa", "123", NOW(), NOW());
INSERT INTO diary (user_id, diary_date, title, content,create_at, update_at)
VALUES (1,"20240101","1title", "1content", NOW(), NOW()),
(1,"20240102","2title", "2content", NOW(), NOW());
INSERT INTO tag (category, tag_name)
VALUES ("감정", "기쁨"), ("감정", "슬픔"), ("인물", "친구"), ("인물", "가족");
INSERT INTO diarytag (diary_id, tag_id)
VALUES (1,1),(1,2),(1,3),(1,4),(2,3),(2,4);
INSERT INTO chat (sender, content, chat_type, user_id, create_at)
VALUES ("USER", "", "IMG", 1, NOW()),("USER", "", "IMG", 1, NOW()),("LULU", "", "CHAT", 1, NOW()),("CHICHI", "", "CHAT", 1, NOW());
INSERT INTO photo (image_url)
VALUES ("1imageUrl"), ("2imageUrl");
INSERT INTO diaryphoto (diary_id, photo_id)
VALUES (1, (SELECT photo_id FROM photo WHERE image_url = "1imageUrl")),
(1, (SELECT photo_id FROM photo WHERE image_url = "2imageUrl"));
요청 예시:http://localhost:8080/get-monthly-diary?user_id=1&year=2024&month=1