From 1d1bb0e0bf031d6b5defeec59a02d462f54e99a9 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Fri, 12 Jan 2024 17:23:04 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=908.0.5=E3=80=91=E3=80=90notice=E3=80=91?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=91=E9=80=81=E5=92=8C=E6=92=A4=E5=9B=9E?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysNoticeController.java | 36 ++++++++++++------- .../notice/service/SysNoticeService.java | 20 +++++++++-- .../service/impl/SysNoticeServiceImpl.java | 24 +++++++++++++ 3 files changed, 66 insertions(+), 14 deletions(-) diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/controller/SysNoticeController.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/controller/SysNoticeController.java index 44f4a897d..836fb08a6 100644 --- a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/controller/SysNoticeController.java +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/controller/SysNoticeController.java @@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; -import java.util.List; /** * 通知管理控制器 @@ -89,17 +88,6 @@ public class SysNoticeController { return new SuccessResponseData<>(sysNoticeService.detail(sysNoticeRequest)); } - /** - * 获取通知管理列表 - * - * @author fengshuonan - * @since 2024/01/12 16:06 - */ - @GetResource(name = "获取通知管理列表", path = "/sysNotice/list") - public ResponseData> list(SysNoticeRequest sysNoticeRequest) { - return new SuccessResponseData<>(sysNoticeService.findList(sysNoticeRequest)); - } - /** * 获取通知管理列表(带分页) * @@ -111,4 +99,28 @@ public class SysNoticeController { return new SuccessResponseData<>(sysNoticeService.findPage(sysNoticeRequest)); } + /** + * 发送通知 + * + * @author fengshuonan + * @since 2024/01/12 16:06 + */ + @PostResource(name = "发送通知", path = "/sysNotice/publishNotice") + public ResponseData publishNotice(@RequestBody @Validated(BaseRequest.detail.class) SysNoticeRequest sysNoticeRequest) { + this.sysNoticeService.publishNotice(sysNoticeRequest); + return new SuccessResponseData<>(); + } + + /** + * 撤回通知 + * + * @author fengshuonan + * @since 2024/01/12 16:06 + */ + @PostResource(name = "撤回通知", path = "/sysNotice/retractNotice") + public ResponseData retractNotice(@RequestBody @Validated(BaseRequest.detail.class) SysNoticeRequest sysNoticeRequest) { + this.sysNoticeService.retractNotice(sysNoticeRequest); + return new SuccessResponseData<>(); + } + } diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/service/SysNoticeService.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/service/SysNoticeService.java index c9fa3709f..b97e45496 100644 --- a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/service/SysNoticeService.java +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/service/SysNoticeService.java @@ -63,7 +63,7 @@ public interface SysNoticeService extends IService { /** * 获取通知管理列表 * - * @param sysNoticeRequest 请求参数 + * @param sysNoticeRequest 请求参数 * @return List 返回结果 * @author fengshuonan * @since 2024/01/12 16:06 @@ -73,11 +73,27 @@ public interface SysNoticeService extends IService { /** * 获取通知管理分页列表 * - * @param sysNoticeRequest 请求参数 + * @param sysNoticeRequest 请求参数 * @return PageResult 返回结果 * @author fengshuonan * @since 2024/01/12 16:06 */ PageResult findPage(SysNoticeRequest sysNoticeRequest); + /** + * 发送通知给接收人 + * + * @author fengshuonan + * @since 2024-01-12 17:15 + */ + void publishNotice(SysNoticeRequest sysNoticeRequest); + + /** + * 撤回通知 + * + * @author fengshuonan + * @since 2024-01-12 17:16 + */ + void retractNotice(SysNoticeRequest sysNoticeRequest); + } diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/service/impl/SysNoticeServiceImpl.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/service/impl/SysNoticeServiceImpl.java index 5e5e63f90..dc3d80bd8 100644 --- a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/service/impl/SysNoticeServiceImpl.java +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/notice/service/impl/SysNoticeServiceImpl.java @@ -97,6 +97,30 @@ public class SysNoticeServiceImpl extends ServiceImpl findList(SysNoticeRequest sysNoticeRequest) { LambdaQueryWrapper wrapper = this.createWrapper(sysNoticeRequest);