Skip to content

Commit a48c7bf

Browse files
authored
Merge pull request #282 from prgrms-aibe-devcourse/develop
Chore: 프로젝트 메인 브랜치 병합 #276
2 parents 8b44209 + da0ac57 commit a48c7bf

8 files changed

Lines changed: 10 additions & 23 deletions

File tree

.github/badges/branches.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"branches": 47.74774774774775, "coverage": 62.94857565667776}
1+
{"branches": 46.42857142857143, "coverage": 61.76933765632238}

.github/badges/jacoco.svg

Lines changed: 1 addition & 1 deletion
Loading

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
generate-summary: true
6868

6969
- name: 커버리지 뱃지 커밋
70-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
70+
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
7171
run: |
7272
if [[ `git status --porcelain` ]]; then
7373
git config --global user.name 'kjyy08'

src/main/java/kr/co/amateurs/server/controller/ai/AiController.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,9 @@ public ResponseEntity<List<PostRecommendationResponse>> getAiRecommendations(
3939
@AuthenticationPrincipal CustomUserDetails currentUser,
4040
@RequestParam(name="limit", defaultValue="10") int limit) {
4141

42-
StopWatch stopWatch = new StopWatch("RecommendPosts API");
43-
stopWatch.start("getRecommendPosts");
44-
4542
Long userId = currentUser.getUser().getId();
4643
List<PostRecommendationResponse> recommendations = postRecommendService.getStoredRecommendations(userId, limit);
4744

48-
stopWatch.stop();
49-
log.info("맞춤글 조회 완료 - 소요시간: {}ms, 결과 개수: {}",
50-
stopWatch.getLastTaskTimeMillis(), recommendations.size());
5145
return ResponseEntity.ok(recommendations);
5246
}
5347

@@ -56,14 +50,8 @@ public ResponseEntity<List<PostRecommendationResponse>> getAiRecommendations(
5650
public ResponseEntity<List<PopularPostResponse>> getPopularPosts(
5751
@RequestParam(name="limit", defaultValue="10") int limit) {
5852

59-
StopWatch stopWatch = new StopWatch("PopularPosts API");
60-
stopWatch.start("getPopularPosts");
61-
6253
List<PopularPostResponse> popularPosts = popularPostService.getPopularPosts(limit);
6354

64-
stopWatch.stop();
65-
log.info("인기글 조회 완료 - 소요시간: {}ms, 결과 개수: {}",
66-
stopWatch.getLastTaskTimeMillis(), popularPosts.size());
6755
return ResponseEntity.ok(popularPosts);
6856
}
6957

src/main/java/kr/co/amateurs/server/domain/dto/user/UserProfileResponseDTO.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ public record UserProfileResponseDTO(
4242
ProviderType providerType,
4343

4444
@Schema(description = "관심 토픽 목록")
45-
Set<Topic> topics
45+
Set<Topic> topics,
46+
47+
@Schema(description = "프로필 완성 여부")
48+
Boolean isProfileCompleted
4649
) {
4750

4851
public static UserProfileResponseDTO from(User user) {
@@ -59,6 +62,7 @@ public static UserProfileResponseDTO from(User user) {
5962
.topics(user.getUserTopics().stream()
6063
.map(UserTopic::getTopic)
6164
.collect(Collectors.toSet()))
65+
.isProfileCompleted(user.isProfileCompleted())
6266
.build();
6367
}
6468
}

src/main/java/kr/co/amateurs/server/service/post/PopularPostCacheService.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,12 @@ public class PopularPostCacheService {
2525
@Transactional(readOnly = true)
2626
public List<PopularPostResponse> getCachedPopularPosts(int limit) {
2727
try {
28-
log.info("인기글 DB 조회 시작 - Redis 캐시 MISS: limit={}", limit);
29-
3028
List<PopularPostRequest> requests = popularPostRepository.findLatestPopularPosts(limit);
3129

3230
List<PopularPostResponse> result = requests.stream()
3331
.map(PopularPostResponse::from)
3432
.collect(Collectors.toList());
3533

36-
log.info("인기글 DB 조회 완료: {}개 → Redis 캐싱됨", result.size());
3734
return result;
3835

3936
} catch (Exception e) {

src/main/java/kr/co/amateurs/server/service/post/PopularPostService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void calculateAndSavePopularPosts() {
3434
LocalDateTime daysAgo = LocalDateTime.now().minusDays(7);
3535
LocalDate today = LocalDate.now();
3636

37-
log.info("인기글 계산 시작: 기준일자={}, 대상기간=3일", today);
37+
log.info("인기글 계산 시작: 기준일자={}, 대상기간=7일", today);
3838

3939
List<PopularPostRequest> recentPosts = popularPostRepository.findRecentPostsWithCounts(daysAgo);
4040

@@ -51,8 +51,6 @@ public void calculateAndSavePopularPosts() {
5151
.collect(Collectors.toList());
5252

5353
popularPostRepository.savePopularPosts(popularPosts);
54-
log.info("인기글 계산 완료: 총 {}개 게시글 처리", popularPosts.size());
55-
5654
popularPostRepository.deleteBeforeDate(today);
5755
popularPostCacheService.invalidatePopularPostsCache();
5856
}

0 commit comments

Comments
 (0)