✨ Feat: 유저가 작성한 게시글, 댓글 확인 기능 구현 - #169
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds endpoints and business logic to retrieve the boards and comments written by the authenticated user, complete with mappers, DTOs, and unit tests. While the implementation is comprehensive, there are critical issues to address: duplicate query definitions for 'findBoardList' and 'countPublishedBoards' in 'BoardMapper.xml' will cause application startup failures, and encoding issues have resulted in broken Korean characters in the Swagger annotations of both 'BoardController' and 'CommentController'.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| <select id="findBoardList" resultType="com.dodo.backend.board.dto.response.BoardResponse$BoardListQueryResponse"> | ||
| SELECT | ||
| b.board_id AS boardId, | ||
| b.board_title AS boardTitle, | ||
| b.board_content AS boardContent, | ||
| ( | ||
| SELECT i.image_file_url | ||
| FROM image_file i | ||
| WHERE i.board_id = b.board_id | ||
| ORDER BY i.image_file_id ASC | ||
| LIMIT 1 | ||
| ) AS thumbnailImageUrl, | ||
| u.nickname AS nickname, | ||
| b.view_count AS viewCount, | ||
| ( | ||
| SELECT COUNT(*) | ||
| FROM comment c | ||
| WHERE c.board_id = b.board_id | ||
| ) AS commentCount, | ||
| ( | ||
| SELECT COUNT(*) | ||
| FROM reaction r | ||
| WHERE r.board_id = b.board_id | ||
| AND r.reaction_type = 'LIKE' | ||
| ) AS likeCount, | ||
| ( | ||
| SELECT COUNT(*) | ||
| FROM reaction r | ||
| WHERE r.board_id = b.board_id | ||
| AND r.reaction_type = 'DISLIKE' | ||
| ) AS dislikeCount, | ||
| b.board_created_at AS createdAt, | ||
| b.modified_at AS modifiedAt | ||
| FROM board b | ||
| INNER JOIN users u ON u.users_id = b.user_id | ||
| WHERE b.board_status = 'PUBLISHED' | ||
| ORDER BY b.board_created_at DESC, b.board_id DESC | ||
| LIMIT #{size} | ||
| OFFSET #{offset} | ||
| </select> | ||
|
|
||
| <select id="countPublishedBoards" resultType="long"> | ||
| SELECT COUNT(*) | ||
| FROM board b | ||
| WHERE b.board_status = 'PUBLISHED' | ||
| </select> |
- 내가 쓴 게시글 목록 조회 API 추가 - 내가 쓴 댓글 목록 조회 API 추가 - Board/Comment Mapper 조회 쿼리 및 페이징 처리 구현 - 댓글 응답 DTO 및 MyBatis 매퍼 XML 추가 - Service/Controller 테스트 코드 작성
- BoardMapper.xml 내 중복 findBoardList 쿼리 제거 - 중복 countPublishedBoards 쿼리 제거 - 게시글 목록 조회 시 FREE 타입 조건 유지 - MyBatis 매퍼 중복 등록으로 인한 CI 실패 수정 Closes DoDo-Project#168
- develop 병합 후 재발생한 BoardMapper.xml 중복 쿼리 제거
- CommentServiceImpl Transactional 어노테이션 순서 정리 - CommentResponse Swagger 어노테이션 제거 및 Javadoc 정리 - comment 도메인 미사용 DTO 및 메서드 참조 확인 - BoardMapper.xml 중복 findBoardList/countPublishedBoards 쿼리 제거
📄 작업 내용 (Description)
로그인한 인증 유저가 자신이 작성한 게시글 목록과 댓글 목록을 각각 조회할 수 있는 API를 구현합니다.
🔗 관련 이슈 (Related Issues)
✅ 체크리스트 (Checklist)
Style)Test)📸 스크린샷 (Screenshots)
💬 기타 사항 (Etc)