-
Notifications
You must be signed in to change notification settings - Fork 0
대시보드_최근_목록_클릭_기능_추가 #555
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
base: main
Are you sure you want to change the base?
The head ref may contain hidden characters: "20260227_#552_\uB300\uC2DC\uBCF4\uB4DC_\uCD5C\uADFC_\uBAA9\uB85D_\uD074\uB9AD_\uAE30\uB2A5_\uCD94\uAC00"
대시보드_최근_목록_클릭_기능_추가 #555
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -308,6 +308,22 @@ public AdminResponse getRecentMembersForAdmin(int limit) { | |
| .build(); | ||
| } | ||
|
|
||
| /** | ||
| * 관리자용 회원 단건 조회 | ||
| */ | ||
| @Transactional(readOnly = true) | ||
| public AdminResponse getMemberDetailForAdmin(AdminRequest request) { | ||
| Member member = memberRepository.findById(request.getMemberId()) | ||
| .orElseThrow(() -> { | ||
| log.error("관리자 회원 단건 조회 실패 - 존재하지 않는 memberId: {}", request.getMemberId()); | ||
| return new CustomException(ErrorCode.MEMBER_NOT_FOUND); | ||
| }); | ||
|
|
||
| return AdminResponse.builder() | ||
| .member(member) | ||
| .build(); | ||
| } | ||
|
|
||
|
Comment on lines
+312
to
+327
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== 1. AdminRequest 검증 어노테이션 확인 =="
fd -t f 'AdminRequest.java' | head -5 | while read file; do
echo "--- $file ---"
cat -n "$file" || true
done
echo
echo "== 2. AdminApiController에서 getMemberDetail 관련 코드 확인 =="
fd -t f 'AdminApiController.java' | head -1 | while read file; do
echo "--- $file ---"
cat -n "$file" | grep -A 20 -B 5 "getMemberDetail\|@Valid\|@Validated" || true
done
echo
echo "== 3. MemberService에서 findMemberById 메서드 확인 =="
fd -t f 'MemberService.java' | head -1 | while read file; do
echo "--- $file ---"
cat -n "$file" | sed -n '330,345p'
done
echo
echo "== 4. MemberService에서 Admin 관련 메서드 검색 =="
fd -t f 'MemberService.java' | head -1 | while read file; do
echo "--- $file ---"
rg -n 'public.*Admin|getMemberDetail' "$file" || true
doneRepository: TEAM-ROMROM/RomRom-BE Length of output: 5210 관리자 회원 단건 조회:
제안 diff (중복 제거 방향) `@Transactional`(readOnly = true)
public AdminResponse getMemberDetailForAdmin(AdminRequest request) {
- Member member = memberRepository.findById(request.getMemberId())
- .orElseThrow(() -> {
- log.error("관리자 회원 단건 조회 실패 - 존재하지 않는 memberId: {}", request.getMemberId());
- return new CustomException(ErrorCode.MEMBER_NOT_FOUND);
- });
+ // AdminRequest에 `@NotNull` + 컨트롤러에 `@Valid` 추가 필수
+ Member member = findMemberById(request.getMemberId());
return AdminResponse.builder()
.member(member)
.build();
}🤖 Prompt for AI Agents |
||
| /** | ||
| * PK 기반 회원조회 | ||
| */ | ||
|
|
||
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.
문서 규칙과 실제 구현이 어긋날 수 있어 예외/범위를 명시해두는 게 좋겠습니다.
@ModelAttribute”를 “전체 공통”으로 선언했는데, 이번 PR의AdminApiController만 봐도GET /dashboard/*,GET /items,GET /members,DELETE /items/{itemId}가 존재합니다. “예외 케이스(예: 조회는 GET, 삭제는 DELETE 등)”를 문서에 같이 적어두면 혼선이 줄어들어요.또한 markdownlint 힌트(MD040)처럼 Line 55의 fenced code block에 언어가 빠져 있습니다.
제안 diff (MD040 해결)
Also applies to: 52-66
🤖 Prompt for AI Agents