-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 알림을 확인 할 수 있는 알림센터 기능 추가 #392
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
18 changes: 13 additions & 5 deletions
18
...main/notification/api/PushController.java → ...ification/api/NotificationController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,38 @@ | ||
package com.depromeet.domain.notification.api; | ||
|
||
import com.depromeet.domain.notification.application.PushService; | ||
import com.depromeet.domain.notification.application.NotificationService; | ||
import com.depromeet.domain.notification.dto.NotificationFindAllResponse; | ||
import com.depromeet.domain.notification.dto.request.PushMissionRemindRequest; | ||
import com.depromeet.domain.notification.dto.request.PushUrgingSendRequest; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
import java.util.List; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
@Tag(name = "8. [알림]", description = "알림 관련 API") | ||
@RestController | ||
@RequestMapping("/notifications") | ||
@RequiredArgsConstructor | ||
public class PushController { | ||
private final PushService pushService; | ||
public class NotificationController { | ||
private final NotificationService notificationService; | ||
|
||
@Operation(summary = "알림센터 조회", description = "알림센터 목록을 조회합니다.") | ||
@GetMapping | ||
public List<NotificationFindAllResponse> notificationFindAll() { | ||
return notificationService.findAllNotification(); | ||
} | ||
|
||
@Operation(summary = "재촉하기", description = "당일 미션을 완료하지 않은 친구에게 재촉하기 Push Message를 발송합니다.") | ||
@PostMapping("/urging") | ||
public void urgingSend(@Valid @RequestBody PushUrgingSendRequest request) { | ||
pushService.sendUrgingPush(request); | ||
notificationService.sendUrgingPush(request); | ||
} | ||
|
||
@Operation(summary = "미션 타이머 리마인드 알림", description = "인증을 놓치는 경우에 대비하여 리마인드 알림을 전송합니다.") | ||
@PostMapping("/missions/remind") | ||
public void missionRemindSend(@Valid @RequestBody PushMissionRemindRequest request) { | ||
pushService.sendMissionRemindPush(request); | ||
notificationService.sendMissionRemindPush(request); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/java/com/depromeet/domain/notification/dto/NotificationFindAllResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.depromeet.domain.notification.dto; | ||
|
||
import com.depromeet.domain.mission.domain.*; | ||
import com.depromeet.domain.notification.domain.NotificationType; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.time.LocalDateTime; | ||
|
||
public record NotificationFindAllResponse( | ||
@Schema(description = "알림 타입") NotificationType notificationType, | ||
@Schema(description = "알림 날짜") LocalDateTime createdAt) { | ||
|
||
public static NotificationFindAllResponse of( | ||
NotificationType notificationType, LocalDateTime createdAt) { | ||
return new NotificationFindAllResponse(notificationType, createdAt); | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notificationType과 createdAt만 DTO로 정하신 이유가 있나요??
source나 targetId로 필요한 데이터가 있지 않을까해서용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
알림에 대한 후속 액션이 없고
단순 뷰로 보여주기위한 기획이여서
요대로 작성했숨니당