Skip to content

[DP-395/396] trend_snapshots·content_view_logs DDL + 조회 이력 기록#128

Merged
suheon98 merged 1 commit intodevelopV2from
feature/DP-395-396-ddl
Apr 23, 2026
Merged

[DP-395/396] trend_snapshots·content_view_logs DDL + 조회 이력 기록#128
suheon98 merged 1 commit intodevelopV2from
feature/DP-395-396-ddl

Conversation

@suheon98
Copy link
Copy Markdown
Collaborator

Summary

  • DP-395: trend_snapshots 테이블 DDL — AI 서버 트렌드 분석 결과 저장용, BE는 JPA Entity로 스키마만 생성
  • DP-396: content_view_logs 테이블 DDL + ContentService.getDetail() 진입 시 조회 이력 기록 (fire-and-forget, 봇 UA 필터링)
  • Jira 스펙의 user_id BIGINTUUID 수정 (User PK = UUID)

변경 파일

  • domain/trend/entity/TrendSnapshot.java (신규) — UNIQUE(unit, scope, period_start), 인덱스 포함
  • domain/content/entity/ContentViewLog.java (신규) — 인덱스 2개 포함
  • domain/content/repository/ContentViewLogRepository.java (신규)
  • domain/content/service/ContentViewLogService.java (신규) — 봇 UA 필터링, REQUIRES_NEW TX
  • ContentService.getDetail()userAgent 파라미터 추가, 뷰 로그 기록 (try-catch)
  • ContentController.getDetail()HttpServletRequest로 User-Agent 추출

Test plan

  • TrendSnapshotTest — 필드 검증 3케이스
  • ContentViewLogServiceTest — 봇 필터링 + 정상/null UA 9케이스
  • ContentServiceTest — 뷰 로그 호출 검증, fire-and-forget 실패 케이스 추가
  • ContentControllerTest — 3파라미터 시그니처 반영
  • ./gradlew build --no-daemon 전체 통과

@sonarqubecloud
Copy link
Copy Markdown

@suheon98 suheon98 merged commit 6a9aa98 into developV2 Apr 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant