From 16cd04631cc588eb8b95ab799f7dc953b20d84ed Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Tue, 7 Mar 2023 15:09:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkrs/straw/controller/NoticeController.java | 8 ++++++++ src/main/java/com/xkrs/straw/service/NoticeService.java | 5 +++++ .../com/xkrs/straw/service/impl/NoticeServiceImpl.java | 8 ++++++++ 3 files changed, 21 insertions(+) diff --git a/src/main/java/com/xkrs/straw/controller/NoticeController.java b/src/main/java/com/xkrs/straw/controller/NoticeController.java index abd1d38..733618e 100644 --- a/src/main/java/com/xkrs/straw/controller/NoticeController.java +++ b/src/main/java/com/xkrs/straw/controller/NoticeController.java @@ -44,4 +44,12 @@ public class NoticeController { return noticeService.queryNotice(token); } + /** + * 已读通知 + */ + @PostMapping("/readNotice") + public String readNotice(@RequestHeader(value = "Authorization") String token, @RequestBody Long id) { + return noticeService.readNotice(token, id); + } + } diff --git a/src/main/java/com/xkrs/straw/service/NoticeService.java b/src/main/java/com/xkrs/straw/service/NoticeService.java index 4e06a62..762a34e 100644 --- a/src/main/java/com/xkrs/straw/service/NoticeService.java +++ b/src/main/java/com/xkrs/straw/service/NoticeService.java @@ -27,4 +27,9 @@ public interface NoticeService { */ String queryNotice(String token); + /** + * 已读通知 + */ + String readNotice(String token, Long id); + } diff --git a/src/main/java/com/xkrs/straw/service/impl/NoticeServiceImpl.java b/src/main/java/com/xkrs/straw/service/impl/NoticeServiceImpl.java index 6933209..fa5b690 100644 --- a/src/main/java/com/xkrs/straw/service/impl/NoticeServiceImpl.java +++ b/src/main/java/com/xkrs/straw/service/impl/NoticeServiceImpl.java @@ -169,6 +169,14 @@ public class NoticeServiceImpl implements NoticeService { return outputEncapsulationObject(PromptMessageEnum.SUCCESS, resultList, locale); } + /** + * 已读通知 + */ + @Override + public String readNotice(String token, Long id) { + return null; + } + /** * 判断noticeId对应的公告栏通知是否已读 */