Skip to content

✨ Feat: 유저가 작성한 게시글, 댓글 확인 기능 구현 - #169

Merged
limhb708 merged 10 commits into
DoDo-Project:developfrom
limhb708:frature/168
Jun 13, 2026
Merged

✨ Feat: 유저가 작성한 게시글, 댓글 확인 기능 구현#169
limhb708 merged 10 commits into
DoDo-Project:developfrom
limhb708:frature/168

Conversation

@limhb708

Copy link
Copy Markdown
Collaborator

📄 작업 내용 (Description)

이번 PR에서 변경되거나 추가된 주요 작업을 간단히 설명해주세요.

로그인한 인증 유저가 자신이 작성한 게시글 목록과 댓글 목록을 각각 조회할 수 있는 API를 구현합니다.


🔗 관련 이슈 (Related Issues)

작업한 이슈 번호를 아래 형식으로 PULL REQUEST BODY에 작성해주세요.
(PR 머지 시 해당 이슈가 자동으로 종료됩니다.)


✅ 체크리스트 (Checklist)

PR을 보내기 전 아래 항목들을 모두 확인해주세요.

  • PR 제목은 커밋 컨벤션을 따랐습니다.
  • 관련 이슈를 연결했습니다.
  • 스스로 코드를 검토하고 불필요한 코드를 제거했습니다.
  • 코드 스타일이 프로젝트 규칙과 일치합니다. (Style)
  • 새로운 기능에 대한 테스트 코드를 추가했거나, 기존 테스트가 모두 통과했습니다. (Test)

📸 스크린샷 (Screenshots)

작업 내용과 관련된 스크린샷이 있다면 첨부해주세요. (UI 변경이 있는 경우)

Before After

💬 기타 사항 (Etc)

리뷰어에게 전달하고 싶은 추가 정보가 있다면 자유롭게 작성해주세요.

@limhb708 limhb708 self-assigned this Jun 12, 2026
@limhb708 limhb708 added ✨ Feature 새 기능 혹은 요구 사항 🦥 임현빈 임현빈 파트 labels Jun 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +8 to +53
<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

BoardMapper.xml 파일 상단에 추가된 findBoardList 및 countPublishedBoards 쿼리문은 이미 파일 하단(137~188라인)에 정의되어 있습니다. MyBatis에서 동일한 id를 가진 쿼리가 중복 정의되면 애플리케이션 기동 시 IllegalArgumentException이 발생하며 서버가 시작되지 않습니다. 중복된 상단 정의를 제거해 주시기 바랍니다.

Comment thread src/main/java/com/dodo/backend/board/controller/BoardController.java Outdated
Comment thread src/main/java/com/dodo/backend/comment/controller/CommentController.java Outdated
limhb708 and others added 4 commits June 12, 2026 21:17
- 내가 쓴 게시글 목록 조회 API 추가

- 내가 쓴 댓글 목록 조회 API 추가

- Board/Comment Mapper 조회 쿼리 및 페이징 처리 구현

- 댓글 응답 DTO 및 MyBatis 매퍼 XML 추가

- Service/Controller 테스트 코드 작성
- BoardMapper.xml 내 중복 findBoardList 쿼리 제거

- 중복 countPublishedBoards 쿼리 제거

- 게시글 목록 조회 시 FREE 타입 조건 유지

- MyBatis 매퍼 중복 등록으로 인한 CI 실패 수정

Closes DoDo-Project#168
WhiteBin-bin
WhiteBin-bin previously approved these changes Jun 12, 2026
- develop 병합 후 재발생한 BoardMapper.xml 중복 쿼리 제거
WhiteBin-bin and others added 2 commits June 12, 2026 23:44
- CommentServiceImpl Transactional 어노테이션 순서 정리

- CommentResponse Swagger 어노테이션 제거 및 Javadoc 정리

- comment 도메인 미사용 DTO 및 메서드 참조 확인

- BoardMapper.xml 중복 findBoardList/countPublishedBoards 쿼리 제거
@limhb708
limhb708 merged commit 7ff22c1 into DoDo-Project:develop Jun 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새 기능 혹은 요구 사항 🦥 임현빈 임현빈 파트

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 작성한 게시글, 댓글 확인

2 participants