From 739cd28427eec7cfa798748f3f26fde93f3b2f9a Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Tue, 7 Mar 2023 13:42:55 +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 --- .../straw/controller/NoticeController.java | 47 +++++++++++++++++++ .../com/xkrs/straw/service/NoticeService.java | 30 ++++++++++++ .../straw/service/impl/NoticeServiceImpl.java | 45 ++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 src/main/java/com/xkrs/straw/controller/NoticeController.java create mode 100644 src/main/java/com/xkrs/straw/service/NoticeService.java create mode 100644 src/main/java/com/xkrs/straw/service/impl/NoticeServiceImpl.java diff --git a/src/main/java/com/xkrs/straw/controller/NoticeController.java b/src/main/java/com/xkrs/straw/controller/NoticeController.java new file mode 100644 index 0000000..abd1d38 --- /dev/null +++ b/src/main/java/com/xkrs/straw/controller/NoticeController.java @@ -0,0 +1,47 @@ +package com.xkrs.straw.controller; + +import com.xkrs.straw.model.entity.NoticeEntity; +import com.xkrs.straw.service.NoticeService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +@RestController +public class NoticeController { + + @Resource + private NoticeService noticeService; + + /** + * 添加通知 + */ + @PostMapping("/insertNotice") + public String insertNotice(@RequestHeader(value = "Authorization") String token, @RequestBody NoticeEntity insertQo) { + return noticeService.insertNotice(token, insertQo); + } + + /** + * 删除通知 + */ + @PostMapping("/deleteNotice") + public String deleteNotice(@RequestHeader(value = "Authorization") String token, @RequestBody Long id) { + return noticeService.deleteNotice(token, id); + } + + /** + * 更新通知 + */ + @PostMapping("/updateNotice") + public String updateNotice(@RequestHeader(value = "Authorization") String token, @RequestBody NoticeEntity updateQo) { + return noticeService.updateNotice(token, updateQo); + } + + /** + * 查询通知 + */ + @GetMapping("/queryNotice") + public String queryNotice(@RequestHeader(value = "Authorization") String token) { + return noticeService.queryNotice(token); + } + +} diff --git a/src/main/java/com/xkrs/straw/service/NoticeService.java b/src/main/java/com/xkrs/straw/service/NoticeService.java new file mode 100644 index 0000000..4e06a62 --- /dev/null +++ b/src/main/java/com/xkrs/straw/service/NoticeService.java @@ -0,0 +1,30 @@ +package com.xkrs.straw.service; + +import com.xkrs.straw.model.entity.NoticeEntity; + +/** + * 公告栏通知接口 + */ +public interface NoticeService { + + /** + * 添加通知 + */ + String insertNotice(String token, NoticeEntity insertQo); + + /** + * 删除通知 + */ + String deleteNotice(String token, Long id); + + /** + * 更新通知 + */ + String updateNotice(String token, NoticeEntity updateQo); + + /** + * 查询通知 + */ + String queryNotice(String token); + +} diff --git a/src/main/java/com/xkrs/straw/service/impl/NoticeServiceImpl.java b/src/main/java/com/xkrs/straw/service/impl/NoticeServiceImpl.java new file mode 100644 index 0000000..97a1c6b --- /dev/null +++ b/src/main/java/com/xkrs/straw/service/impl/NoticeServiceImpl.java @@ -0,0 +1,45 @@ +package com.xkrs.straw.service.impl; + +import com.xkrs.straw.model.entity.NoticeEntity; +import com.xkrs.straw.service.NoticeService; +import org.springframework.stereotype.Service; + +/** + * 公告栏通知接口 + */ +@Service +public class NoticeServiceImpl implements NoticeService { + + /** + * 添加通知 + */ + @Override + public String insertNotice(String token, NoticeEntity insertQo) { + return null; + } + + /** + * 删除通知 + */ + @Override + public String deleteNotice(String token, Long id) { + return null; + } + + /** + * 更新通知 + */ + @Override + public String updateNotice(String token, NoticeEntity updateQo) { + return null; + } + + /** + * 查询通知 + */ + @Override + public String queryNotice(String token) { + return null; + } + +}