[improve/#128] 회사 목록 조회 API 개선 - 오늘 발행 여부, 정렬, 로고 URL, 전체 회사 개수 추가 #155
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 V2를 추가하여 오늘 발행 여부, 최신 발행일 기준 정렬, 로고 URL을 포함한 상세 정보를 제공합니다.
주요 변경사항
1. PostControllerV2 생성
GET /api/v2/posts/companies2. CompanyDto 개선
logoUrl필드 추가latestPublishedAt필드로 정렬 기준 제공hasNewPost필드로 오늘 발행 여부 제공3. PostRepository 쿼리 추가
findCompaniesWithDetails(): 회사별 집계 쿼리GROUP BY p.company로 회사별 그룹화COUNT(CASE WHEN FUNCTION('DATE', p.publishedAt) = CURRENT_DATE ...)로 오늘 발행 여부 계산MAX(p.publishedAt)로 최신 발행일 기준 정렬4. 테스트 코드 작성
연결된 issue
연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #128
✅ 체크리스트