diff --git a/src/main/java/com/selfrunner/gwalit/domain/board/service/BoardService.java b/src/main/java/com/selfrunner/gwalit/domain/board/service/BoardService.java index 01c7765e..b3c5d4c1 100644 --- a/src/main/java/com/selfrunner/gwalit/domain/board/service/BoardService.java +++ b/src/main/java/com/selfrunner/gwalit/domain/board/service/BoardService.java @@ -264,6 +264,9 @@ public BoardFileRes getFileCapacity(Member member, Long lectureId) { // Business Logic Long fileCapacity = fileRepository.findCapacityByLectureId(lectureId); + if(fileCapacity == null) { + fileCapacity = 0L; + } return new BoardFileRes(lectureId, fileCapacity); } diff --git a/src/main/java/com/selfrunner/gwalit/domain/notification/dto/response/NotificationRes.java b/src/main/java/com/selfrunner/gwalit/domain/notification/dto/response/NotificationRes.java index a2ab75b6..07a78be4 100644 --- a/src/main/java/com/selfrunner/gwalit/domain/notification/dto/response/NotificationRes.java +++ b/src/main/java/com/selfrunner/gwalit/domain/notification/dto/response/NotificationRes.java @@ -26,6 +26,8 @@ public class NotificationRes { private final String url; + private final Long boardId; + private final LocalDateTime createdAt; public NotificationRes(Notification notification) { @@ -37,6 +39,7 @@ public NotificationRes(Notification notification) { this.lectureId = notification.getLectureId(); this.lessonId = notification.getLessonId(); this.url = notification.getUrl(); + this.boardId = notification.getBoardId(); this.createdAt = notification.getCreatedAt(); } } diff --git a/src/main/java/com/selfrunner/gwalit/domain/notification/repository/NotificationRepositoryImpl.java b/src/main/java/com/selfrunner/gwalit/domain/notification/repository/NotificationRepositoryImpl.java index bd0f4025..cb96ad3c 100644 --- a/src/main/java/com/selfrunner/gwalit/domain/notification/repository/NotificationRepositoryImpl.java +++ b/src/main/java/com/selfrunner/gwalit/domain/notification/repository/NotificationRepositoryImpl.java @@ -24,7 +24,7 @@ public class NotificationRepositoryImpl implements NotificationRepositoryCustom @Override public Slice findNotificationPageableBy(Long cursor, LocalDateTime cursorCreatedAt, Pageable pageable, Long memberId) { - List content = queryFactory.select(Projections.constructor(NotificationRes.class, notification.notificationId, notification.memberId, notification.title, notification.body, notification.name, notification.lectureId, notification.lessonId, notification.url, notification.createdAt )) + List content = queryFactory.select(Projections.constructor(NotificationRes.class, notification.notificationId, notification.memberId, notification.title, notification.body, notification.name, notification.lectureId, notification.lessonId, notification.url, notification.boardId, notification.createdAt )) .from(notification) .leftJoin(memberAndNotification).on(memberAndNotification.notificationId.eq(notification.notificationId)) .where(notification.deletedAt.isNull().and(notification.memberId.isNull().or(memberAndNotification.memberId.eq(memberId))), eqCursorIdAndCursorCreatedAt(cursor, cursorCreatedAt))