-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat:CHAT-152-BE-api-월별-일기-리스트-조회 #24
The head ref may contain hidden characters: "CHAT-152-BE-API-\uC6D4\uBCC4-\uC77C\uAE30-\uB9AC\uC2A4\uD2B8-\uC870\uD68C"
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API 명세서 깔끔하게 작성하신 것 같습니다!
PR은 이전에 비해 수정되었다는 언급만 있고 이전에 어땠는지 안나와있는 점이 아쉽습니다.
이전에 브랜치를 삭제하고 다시 만드시면서 간과한 것 아닌가 싶네요
이 밖에도 엔드포인트나 쿼리에 대한 코멘트 남겨봅니다~
src/main/java/com/kuit/chatdiary/controller/diary/DiaryInquiryController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/kuit/chatdiary/dto/diary/DiaryInquiryResponse.java
Outdated
Show resolved
Hide resolved
src/main/java/com/kuit/chatdiary/service/diary/DiaryInquiryService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/kuit/chatdiary/repository/diary/DiaryInquiryRepository.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨어요:)
src/main/java/com/kuit/chatdiary/service/diary/DiaryListService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/kuit/chatdiary/repository/diary/DiaryListRepository.java
Outdated
Show resolved
Hide resolved
src/main/java/com/kuit/chatdiary/dto/diary/DiaryListResponse.java
Outdated
Show resolved
Hide resolved
src/main/java/com/kuit/chatdiary/service/diary/DiaryListService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/kuit/chatdiary/dto/diary/DiaryListResponse.java
Outdated
Show resolved
Hide resolved
Tag 엔티티 직접 가져오려니 데이터 더 추가시 순환 참조 오류 발생 우려있어서 TagDTO 추가해서 해결
Tag 엔티티 직접 가져오려니 데이터 더 추가시 순환 참조 오류 발생 우려있어서 TagDTO 추가해서 해결, 엔티티 객체 직접 참조 안함
리뷰 반영해서 쉬운이름으로 개선
.size 또한 제외하였습니다.
diaryphoto가 추가됨에 따라 쿼리 로직 수정
0e45eba
to
902b59a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
바뀐 ERD로 rebase 해두었습니다
요약 (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