Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public interface CustomStudyRepository {

List<ProblemInfoDto> searchSolvedProblemInfo(LocalDate date, String memberId);

List<RecentActivityInfoDto> searchRecentActivityInfo(String studyId);
List<RecentActivityInfoDto> searchTodayActivityInfo(String studyId);
}

Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ public List<ProblemInfoDto> searchSolvedProblemInfo(LocalDate date, String membe
}

@Override
public List<RecentActivityInfoDto> searchRecentActivityInfo(String studyId) {
public List<RecentActivityInfoDto> searchTodayActivityInfo(String studyId) {
Timestamp startOfToday = Timestamp.valueOf(LocalDate.now().atStartOfDay());

return query
.select(new QRecentActivityInfoDto(
memberEntity.memberId,
Expand All @@ -165,10 +167,10 @@ public List<RecentActivityInfoDto> searchRecentActivityInfo(String studyId) {
.join(codeEntity.memberEntity, memberEntity)
.where(
memberEntity.studyEntity.studyId.eq(studyId),
codeEntity.codeStatus.isTrue()
codeEntity.codeStatus.isTrue(),
codeEntity.codeSolvedDate.goe(startOfToday)
)
.orderBy(codeEntity.codeSolvedDate.desc())
.limit(20)
.fetch();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public LogResDto getLog(String memberId, String studyId) {
checkValidMemberAndStudy(memberId, studyId);

//2. 해당 스터디의 최근 활동 정보 조회
List<RecentActivityInfoDto> repoDto = studyRepository.searchRecentActivityInfo(studyId);
List<RecentActivityInfoDto> repoDto = studyRepository.searchTodayActivityInfo(studyId);
return LogResDto.fromRepoDto(repoDto, LocalDateTime.now());
}

Expand Down