mirror of
https://github.com/hwanny1128/HGZero.git
synced 2026-01-21 13:46:26 +00:00
Merge pull request #25 from hwanny1128/feat/meeting
Chore: 회의 예약 API path 변경
This commit is contained in:
commit
8aea75c718
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,7 @@ import com.unicorn.hgzero.meeting.biz.usecase.out.MinutesWriter;
|
||||
import com.unicorn.hgzero.meeting.biz.usecase.out.SessionReader;
|
||||
import com.unicorn.hgzero.meeting.biz.usecase.out.SessionWriter;
|
||||
import com.unicorn.hgzero.meeting.infra.cache.CacheService;
|
||||
import com.unicorn.hgzero.meeting.infra.event.dto.MeetingEndedEvent;
|
||||
import com.unicorn.hgzero.meeting.infra.event.dto.MeetingStartedEvent;
|
||||
import com.unicorn.hgzero.meeting.infra.event.dto.NotificationRequestEvent;
|
||||
import com.unicorn.hgzero.meeting.infra.event.publisher.EventPublisher;
|
||||
@ -28,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.time.Duration;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@ -344,10 +346,53 @@ public class MeetingService implements
|
||||
log.info("Created new analysis data for meeting: {}", meetingId);
|
||||
}
|
||||
|
||||
// TODO: AI 서비스에 비동기 분석 요청 전송
|
||||
// aiAnalysisClient.requestAnalysis(meeting.getMeetingId(), minutes.getMinutesId());
|
||||
// 6. AI 서비스에 회의 종료 이벤트 발행
|
||||
try {
|
||||
MeetingEndedEvent meetingEndedEvent = MeetingEndedEvent.builder()
|
||||
.meetingId(meetingId)
|
||||
.title(meeting.getTitle())
|
||||
.endTime(meeting.getEndedAt())
|
||||
.organizer(meeting.getOrganizerId())
|
||||
.participants(meeting.getParticipants())
|
||||
.minutesId(minutes.getMinutesId())
|
||||
.todoCount(0) // AI 분석으로 추후 업데이트될 예정
|
||||
.eventTime(LocalDateTime.now())
|
||||
.build();
|
||||
|
||||
// 6. 결과 DTO 구성
|
||||
eventPublisher.publishMeetingEnded(meetingEndedEvent);
|
||||
log.info("MeetingEnded event published: meetingId={}, minutesId={}",
|
||||
meetingId, minutes.getMinutesId());
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to publish MeetingEnded event: meetingId={}", meetingId, e);
|
||||
// 이벤트 발행 실패는 비즈니스 로직에 영향을 주지 않으므로 계속 진행
|
||||
}
|
||||
|
||||
// 7. 참석자에게 회의 종료 알림 이벤트 발행
|
||||
try {
|
||||
for (String participantEmail : meeting.getParticipants()) {
|
||||
NotificationRequestEvent notificationEvent = NotificationRequestEvent.builder()
|
||||
.notificationType("MEETING_ENDED")
|
||||
.recipientEmail(participantEmail)
|
||||
.recipientId(participantEmail)
|
||||
.recipientName(participantEmail)
|
||||
.title("회의 종료")
|
||||
.message(String.format("'%s' 회의가 종료되었습니다. 회의록을 확인해 주세요.", meeting.getTitle()))
|
||||
.relatedEntityId(meetingId)
|
||||
.relatedEntityType("MEETING")
|
||||
.requestedBy(meeting.getOrganizerId())
|
||||
.eventTime(LocalDateTime.now())
|
||||
.build();
|
||||
|
||||
eventPublisher.publishNotificationRequest(notificationEvent);
|
||||
}
|
||||
log.info("Meeting end notification events published: meetingId={}, participants={}",
|
||||
meetingId, meeting.getParticipants().size());
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to publish meeting end notification events: meetingId={}", meetingId, e);
|
||||
// 이벤트 발행 실패는 비즈니스 로직에 영향을 주지 않으므로 계속 진행
|
||||
}
|
||||
|
||||
// 8. 결과 DTO 구성
|
||||
MeetingEndDTO result = buildMeetingEndDTO(meeting, analysis);
|
||||
|
||||
log.info("Meeting ended successfully: {}", meetingId);
|
||||
|
||||
@ -57,7 +57,7 @@ public class MeetingController {
|
||||
description = "새로운 회의를 예약하고 참석자를 초대합니다. 회의 정보 저장, 참석자 목록 관리, 초대 이메일 자동 발송, 리마인더 스케줄링을 수행합니다.",
|
||||
security = @SecurityRequirement(name = "bearerAuth")
|
||||
)
|
||||
@PostMapping
|
||||
@PostMapping("/reserve")
|
||||
public ResponseEntity<ApiResponse<MeetingResponse>> createMeeting(
|
||||
@Parameter(description = "사용자 ID", required = true)
|
||||
@RequestHeader("X-User-Id") String userId,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user