Skip to content

[WTH-474] 페널티 유저 api 구현 - #98

Merged
woneeeee merged 11 commits into
devfrom
fix/WTH-474-페널티-유저-api-구현
Aug 25, 2026

Hidden character warning

The head ref may contain hidden characters: "fix/WTH-474-\ud398\ub110\ud2f0-\uc720\uc800-api-\uad6c\ud604"
Merged

[WTH-474] 페널티 유저 api 구현#98
woneeeee merged 11 commits into
devfrom
fix/WTH-474-페널티-유저-api-구현

Conversation

@woneeeee

@woneeeee woneeeee commented Aug 25, 2026

Copy link
Copy Markdown
Member

📌 Summary

어떤 작업인지 한 줄 요약해 주세요.

유저 마이페이지에서 페널티 목록 및 규정을 조회할 수 있는 API를 구현합니다.

📝 Changes

변경사항을 what, why, how로 구분해 작성해 주세요.

What

  • 마이페이지 stats에 페널티 수 필드 추가
  • 마이페이지 페널티 목록 조회 API 추가 (GET /api/v4/clubs/{clubId}/my/penalties)
  • 마이페이지 페널티 규정 조회 API 추가 (GET /api/v4/clubs/{clubId}/my/penalty-rule)

Why

페널티 관리 UI 변경에 따라 유저가 본인의 페널티 내역 및 규정을 마이페이지에서 확인할 수 있어야 합니다.

How

  • GetUserPenaltyQueryService: 유저의 페널티 목록을 기수 단위로 조회
  • GetUserMyPageQueryService: 기존 stats 응답에 페널티 수 포함
  • ClubMemberMyPageController: 페널티 목록/규정 엔드포인트 추가
  • GetPenaltyRuleQueryService는 어드민 PR(WTH-468)에서 구현, 해당 PR에서 재사용

📸 Screenshots / Logs

필요시 스크린샷 or 로그를 첨부해주세요.

image

💡 Reviewer 참고사항

리뷰에 참고할 내용을 작성해주세요.

본 PR은 어드민 페널티 PR(#97)을 base로 하고 있습니다! WTH-468(#97)이 dev에 머지되면 base를 dev로 변경할 예정입니다!

✅ Checklist

  • PR 제목 설정 완료 (WTH-123 인증 필터 설정)
  • 테스트 구현 완료
  • 리뷰어 등록 완료
  • 자체 코드 리뷰 완료

@woneeeee
woneeeee requested review from hyxklee and soo0711 August 25, 2026 05:38
@woneeeee woneeeee self-assigned this Aug 25, 2026
@woneeeee woneeeee added the 📬 API 서버 API 통신 label Aug 25, 2026
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ae9973f-5922-40bf-8bdc-b09fe0ddbc94


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

private val penaltyReader: PenaltyReader,
private val clubMemberPolicy: ClubMemberPolicy,
) {
@Transactional(readOnly = true)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

여기도 메서드 단위로 들어가있네용

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

어잇 그러네욤... 반영해두겠습니다!

@soo0711 soo0711 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

수고하셧습니다!!

Comment on lines +65 to +75
@GetMapping("/penalty-rule")
@Operation(summary = "현재 동아리 패널티 규정 조회")
fun getPenaltyRule(
@TsidParam
@TsidPathVariable clubId: Long,
@Parameter(hidden = true) @CurrentUser userId: Long,
): CommonResponse<PenaltyRuleResponse> =
CommonResponse.success(
UserResponseCode.USER_PENALTY_RULE_FIND_SUCCESS,
getPenaltyRuleQueryService.getRule(clubId),
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

userId도 파라미터로 넘겨서 사용자가 가입한 동아리인지를 확인하는(정책) 로직도 있어야 할 것 같아요!

@woneeeee woneeeee Aug 25, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

말씀해주신대로 userId를 서비스로 전달해서 ClubMemberPolicy를 통해서 활성 멤버 검증 로직 추가했슴니다!!

Base automatically changed from fix/WTH-468-백엔드-패널티-관리-UI-변경에-따른-수정사항-반영 to dev August 25, 2026 14:27
@woneeeee
woneeeee merged commit 98b2d35 into dev Aug 25, 2026
2 checks passed
@woneeeee
woneeeee deleted the fix/WTH-474-페널티-유저-api-구현 branch August 25, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📬 API 서버 API 통신

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants