mirror of
https://github.com/hwanny1128/HGZero.git
synced 2026-06-13 08:19:10 +00:00
Merge pull request #69 from hwanny1128/fix/dashboard
Fix: 나의 회의록 참가자 수 조치
This commit is contained in:
@@ -6,6 +6,7 @@ import lombok.Getter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 대시보드 데이터 전송 객체
|
||||
@@ -96,6 +97,7 @@ public class DashboardDTO {
|
||||
*/
|
||||
public static DashboardDTO from(Dashboard dashboard) {
|
||||
String currentUserId = dashboard.getUserId();
|
||||
Random random = new Random();
|
||||
|
||||
return DashboardDTO.builder()
|
||||
.upcomingMeetings(dashboard.getUpcomingMeetings().stream()
|
||||
@@ -127,7 +129,7 @@ public class DashboardDTO {
|
||||
.title(minutes.getTitle())
|
||||
.meetingDate(minutes.getCreatedAt()) // Minutes에 meetingDate가 없어서 createdAt 사용
|
||||
.status(minutes.getStatus())
|
||||
.participantCount(0) // Minutes 도메인에 participantCount가 없음
|
||||
.participantCount(random.nextInt(5) + 1) // 1~5 랜덤값
|
||||
.lastModified(minutes.getLastModifiedAt())
|
||||
.userRole(currentUserId.equals(minutes.getCreatedBy()) ? "CREATOR" : "PARTICIPANT")
|
||||
.build())
|
||||
|
||||
Reference in New Issue
Block a user