From 49c2a88a89a207e995b685299876473c3858dddc Mon Sep 17 00:00:00 2001 From: Jack <jack.su@pollex.com.tw> Date: 星期一, 24 一月 2022 16:46:55 +0800 Subject: [PATCH] [ADD] 小鈴鐺通知增加已讀登入者所有通知的API --- pamapi/src/main/java/com/pollex/pam/web/rest/PersonalNotificationResource.java | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/web/rest/PersonalNotificationResource.java b/pamapi/src/main/java/com/pollex/pam/web/rest/PersonalNotificationResource.java index c00c6db..ee805b5 100644 --- a/pamapi/src/main/java/com/pollex/pam/web/rest/PersonalNotificationResource.java +++ b/pamapi/src/main/java/com/pollex/pam/web/rest/PersonalNotificationResource.java @@ -8,6 +8,9 @@ import org.springframework.http.ResponseEntity; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -45,14 +48,8 @@ return new ResponseEntity<>(personalNotificationList, HttpStatus.OK); } -// @GetMapping("/create") -// public void create() { -// PersonalNotification test = new PersonalNotification(); -// test.setContent("content test"); -// test.setNotificationType(NotificationTypeEnum.ACTIVITY); -// test.setOwnerId(Long.valueOf(11)); -// test.setOwnerRole(PersonalNotificationRoleEnum.CONSULTANT); -// test.setTitle("title test"); -// personalNotificationRepository.save(test); -// } + @PostMapping("/readAllMyNotification") + public void readAll() { + personalNotificationService.readAllMyNotification(); + } } -- Gitblit v1.8.0