Skip to content

[#9] feat: 최근 본 공고(RecentView) API - #18

Merged
Bumnote merged 1 commit into
feat/notice-apifrom
feat/recent-view
Jun 28, 2026
Merged

Bumnote merged 1 commit into
feat/notice-apifrom
feat/recent-view

Conversation

@Bumnote

@Bumnote Bumnote commented Jun 28, 2026

Copy link
Copy Markdown
Member

📄 작업 내용

  • 마이페이지 '최근에 본 공고' 탭용 열람 기록 API
    • POST /api/me/recent-views : 캠페인 열람 기록(이미 있으면 열람 시각 갱신, 멱등)
    • GET /api/me/recent-views/ids : 최근 열람 캠페인 ID 목록(최신순, 상한 50)
    • GET /api/me/recent-views : 최근 열람 캠페인 목록(최신순 페이징, CampaignResponse)
  • RecentView 엔티티(member+campaign 유니크) + create/touch 도메인 메서드
  • viewedAt 동률 시 id 안정 정렬, fetch join + countQuery, page/size/limit 방어적 보정

✅ PR 유형

  • Feature

🧪 테스트 내용

  • 로컬 테스트 완료 (RecentViewApiTest 7건 통과)
  • API 테스트 완료

🙋🏻 참고 사항

🔗 관련 이슈

resolved: #9

마이페이지 '최근에 본 공고' 탭이 사용할 열람 기록 API를 추가한다.

- POST /api/me/recent-views : 캠페인 열람 기록(이미 있으면 열람 시각만 갱신, 멱등)
- GET /api/me/recent-views/ids : 최근 열람 캠페인 ID 목록(최신순, 상한 50)
- GET /api/me/recent-views : 최근 열람 캠페인 목록(최신순 페이징, CampaignResponse)
- RecentView 엔티티(member+campaign 유니크)와 정적 팩토리 create, 열람 시각 갱신 touch
- viewedAt 동률 시 id로 안정 정렬, fetch join + countQuery로 페이징 정확성 확보
- 잘못된 page/size/limit는 방어적으로 보정

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Bumnote Bumnote self-assigned this Jun 28, 2026
@Bumnote
Bumnote requested review from Copilot and pug9483 and removed request for Copilot June 28, 2026 05:45
@Bumnote
Bumnote merged commit afc9433 into feat/notice-api Jun 28, 2026
1 check 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