generated from DDINGJOO/TEAMBIND_REPO_SETTUP
-
Notifications
You must be signed in to change notification settings - Fork 1
feat(report): 신고 조회 및 검색 API 구현, 성능 최적화 refs #17 #29 #32
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SupportServer/src/main/java/com/teambind/supportserver/report/dto/request/ReportSearchRequest.java: 필터링(상태, 카테고리 타입), 정렬, 커서 페이징 요청 DTO SupportServer/src/main/java/com/teambind/supportserver/report/dto/response/ReportResponse.java: 신고 정보 응답 DTO 및 Entity → DTO 변환 메서드 SupportServer/src/main/java/com/teambind/supportserver/report/dto/response/CursorPageResponse.java: 커서 기반 페이지네이션 응답 제네릭 DTO
SupportServer/src/main/java/com/teambind/supportserver/report/config/QueryDslConfig.java: JPAQueryFactory 빈 설정 추가 SupportServer/src/main/java/com/teambind/supportserver/report/repository/ReportRepositoryCustom.java: 커스텀 Repository 인터페이스 정의 SupportServer/src/main/java/com/teambind/supportserver/report/repository/ReportRepositoryImpl.java: QueryDSL 기반 동적 필터링 및 커서 페이징 구현
SupportServer/src/main/java/com/teambind/supportserver/report/repository/ReportRepository.java: ReportRepositoryCustom 인터페이스 상속으로 커서 기반 검색 기능 통합
SupportServer/src/main/java/com/teambind/supportserver/report/entity/Report.java: ReportHistory와 양방향 관계 설정, 상태 변경 메서드에 히스토리 자동 생성 로직 추가 참고: 객체지향 설계 개선으로 엔티티가 히스토리 생성 책임 담당
SupportServer/src/main/java/com/teambind/supportserver/report/service/ReportService.java: 검색, 조회, 상태 변경 메서드 시그니처 정의 SupportServer/src/main/java/com/teambind/supportserver/report/service/ReportServiceImpl.java: 커서 기반 검색, 상태 변경 로직 구현 참고: 엔티티 메서드 호출 방식으로 간소화
SupportServer/src/main/java/com/teambind/supportserver/report/controller/ReportController.java: 신고 조회, 검색, 상태 변경 REST API 엔드포인트 구현 SupportServer/src/main/java/com/teambind/supportserver/report/aop/LoggingAspect.java: 컨트롤러 및 서비스 메서드 실행 시간 로깅 AOP
SupportServer/src/main/java/com/teambind/supportserver/report/utils/ReportCategoryCache.java: 카테고리 캐시 인터페이스 정의 SupportServer/src/main/java/com/teambind/supportserver/report/utils/InMemoryReportCategoryCache.java: 메모리 기반 카테고리 캐시 구현
SupportServer/src/main/java/com/teambind/supportserver/report/entity/ReportCategory.java: 카테고리 조회 편의 메서드 추가 SupportServer/src/main/java/com/teambind/supportserver/report/exceptions/ErrorCode.java: 신고 관련 에러 코드 추가
SupportServer/src/test/java/com/teambind/supportserver/report/dto/: ReportSearchRequest, ReportResponse, CursorPageResponse 테스트 22개 추가 참고: 테스트 커버리지 98% 이상 달성
SupportServer/src/test/java/com/teambind/supportserver/report/repository/ReportRepositoryCustomTest.java: QueryDSL 기반 필터링, 정렬, 커서 페이징 테스트 12개 추가
SupportServer/src/test/java/com/teambind/supportserver/report/repository/ReportCategoryRepositoryTest.java: @import(QueryDslConfig.class) 추가 SupportServer/src/test/java/com/teambind/supportserver/report/repository/ReportHistoryRepositoryTest.java: @import(QueryDslConfig.class) 추가 SupportServer/src/test/java/com/teambind/supportserver/report/repository/ReportStatisticsRepositoryTest.java: @import(QueryDslConfig.class) 추가
SupportServer/src/test/java/com/teambind/supportserver/report/repository/SanctionRepositoryTest.java: @import(QueryDslConfig.class) 추가 SupportServer/src/test/java/com/teambind/supportserver/report/repository/SanctionRuleRepositoryTest.java: @import(QueryDslConfig.class) 추가 SupportServer/src/test/java/com/teambind/supportserver/report/repository/ReportRepositoryTest.java: 엔티티 메서드 시그니처 변경 반영
SupportServer/src/test/java/com/teambind/supportserver/report/service/ReportServiceImplTest.java: 신고 조회, 검색, 상태 변경 로직 테스트 17개 추가 참고: Mockito 기반 단위 테스트로 히스토리 자동 생성 검증
SupportServer/src/test/java/com/teambind/supportserver/report/entity/ReportEntityTest.java: 상태 변경 시 히스토리 자동 생성 로직 테스트 19개로 재작성 참고: 리팩토링된 엔티티 메서드 시그니처 반영
SupportServer/src/test/java/com/teambind/supportserver/SupportServerApplicationTests.java: @activeprofiles("test") 추가로 H2 DB 사용 설정
SupportServer/src/test/java/com/teambind/supportserver/report/performance/: 커서 페이징 vs 오프셋 페이징 성능 비교 테스트 추가
SupportServer/build.gradle: QueryDSL 의존성 및 Q클래스 생성 설정, JaCoCo 테스트 커버리지 플러그인 추가
.idea/compiler.xml: QueryDSL annotation processor 설정 추가 .idea/modules/SupportServer.main.iml: 모듈 설정 업데이트
docs/테스트 결과 _2025_10_16.html: 전체 테스트 실행 결과 HTML 리포트 (215+ 테스트 통과)
This was referenced Oct 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
목적
변경 요약
핵심 기능
신고 검색 및 조회 API 구현 ([STORY] 신고 조회 및 관리 #6, [TASK] 신고 조회 API 구현 #17)
신고 상태 변경 관리 ([STORY] 신고 조회 및 관리 #6)
성능 최적화
객체지향 설계 개선 (리팩토링)
주요 파일/모듈
ReportSearchRequest,ReportResponse,CursorPageResponseReportRepositoryCustom,ReportRepositoryImpl(QueryDSL)ReportService,ReportServiceImplReportController,CacheManagementControllerReport(리팩토링),ReportCategoryReportCategoryCache,InMemoryReportCategoryCacheQueryDslConfigPerformanceMonitoringAspect수용 기준 검증
#6 신고 조회 및 관리 - AC 충족
추가 기능 요구사항
성능 요구사항
설계 품질
changeStatus()메서드로 중복 제거성능 테스트 결과
1. 카테고리 캐싱 vs DB 조회 (단일 스레드, 10,000회 조회)
2. 동시성 환경 (10 스레드, 각 1,000회 조회)
3. 테스트 커버리지
상세 결과는
docs/테스트 결과 _2025_10_16.html참조브레이킹/마이그레이션
approve(),reject(),startReview()등 상태 변경 메서드에adminId,comment,historyIdGenerator파라미터 추가테스트
단위 테스트
통합 테스트
수동 검증 방법
향후 작업 (Out of Scope)
본 PR에서는 다음 기능은 구현하지 않으며, 추후 별도 이슈로 진행 예정:
#29 신고 시스템 확장 기능
기타
참고:
ReportStatisticsService.java,SanctionService.java는 인터페이스만 정의되어 있으며, 구현체는 #29 완료 후 추가 예정참조
docs/테스트 결과 _2025_10_16.htmlReportCategoryPerformanceTest.java