From cedfd4096a6f5027c06b697407a4efe26a080349 Mon Sep 17 00:00:00 2001 From: 18154758993 <605281283@qq.com> Date: Mon, 4 Aug 2025 15:42:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NotificationManagementController.java | 36 ++++++++----------- .../NotificationManagementServiceImpl.java | 7 +++- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/srs-admin/src/main/java/com/srs/web/controller/routine/NotificationManagementController.java b/srs-admin/src/main/java/com/srs/web/controller/routine/NotificationManagementController.java index 95e692f..e88e4ab 100644 --- a/srs-admin/src/main/java/com/srs/web/controller/routine/NotificationManagementController.java +++ b/srs-admin/src/main/java/com/srs/web/controller/routine/NotificationManagementController.java @@ -1,6 +1,8 @@ package com.srs.web.controller.routine; + import java.util.List; import javax.servlet.http.HttpServletResponse; + import com.srs.routine.domain.NotificationManagement; import com.srs.routine.domain.dto.SendNotificationDto; import com.srs.routine.service.INotificationManagementService; @@ -15,6 +17,7 @@ import com.srs.common.enums.BusinessType; import com.srs.common.annotation.Log; import com.srs.common.core.page.TableDataInfo; import com.srs.comprehensive.domain.SrsGrade; + /** * 通知管理Controller * @@ -31,11 +34,10 @@ public class NotificationManagementController extends BaseController { /** * 查询通知管理列表 */ -@PreAuthorize("@ss.hasPermi('routine:NotificationManagement:list')") -@GetMapping("/list") -@ApiOperation("查询通知管理列表") - public TableDataInfo list(NotificationManagement notificationManagement) - { + @PreAuthorize("@ss.hasPermi('routine:NotificationManagement:list')") + @GetMapping("/list") + @ApiOperation("查询通知管理列表") + public TableDataInfo list(NotificationManagement notificationManagement) { startPage(); List list = notificationManagementService.selectNotificationManagementList(notificationManagement); return getDataTable(list); @@ -48,8 +50,7 @@ public class NotificationManagementController extends BaseController { @Log(title = "通知管理", businessType = BusinessType.EXPORT) @PostMapping("/export") @ApiOperation("导出通知管理列表") - public void export(HttpServletResponse response, NotificationManagement notificationManagement) - { + public void export(HttpServletResponse response, NotificationManagement notificationManagement) { List list = notificationManagementService.selectNotificationManagementList(notificationManagement); ExcelUtil util = new ExcelUtil(NotificationManagement.class); util.exportExcel(response, list, "通知管理数据"); @@ -61,8 +62,7 @@ public class NotificationManagementController extends BaseController { @PreAuthorize("@ss.hasPermi('routine:NotificationManagement:query')") @GetMapping(value = "/{id}") @ApiOperation("获取通知管理详细信息") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(notificationManagementService.selectNotificationManagementById(id)); } @@ -73,8 +73,7 @@ public class NotificationManagementController extends BaseController { @Log(title = "通知管理", businessType = BusinessType.INSERT) @PostMapping("/add") @ApiOperation("新增通知管理") - public AjaxResult add(@RequestBody NotificationManagement notificationManagement) - { + public AjaxResult add(@RequestBody NotificationManagement notificationManagement) { return toAjax(notificationManagementService.insertNotificationManagement(notificationManagement)); } @@ -85,8 +84,7 @@ public class NotificationManagementController extends BaseController { @Log(title = "通知管理", businessType = BusinessType.UPDATE) @PostMapping("/update") @ApiOperation("修改通知管理") - public AjaxResult edit(@RequestBody NotificationManagement notificationManagement) - { + public AjaxResult edit(@RequestBody NotificationManagement notificationManagement) { return toAjax(notificationManagementService.updateNotificationManagement(notificationManagement)); } @@ -97,8 +95,7 @@ public class NotificationManagementController extends BaseController { @Log(title = "通知管理", businessType = BusinessType.DELETE) @PostMapping("/{ids}") @ApiOperation("删除通知管理") - public AjaxResult remove(@PathVariable Long[] ids) - { + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(notificationManagementService.deleteNotificationManagementByIds(ids)); } @@ -108,8 +105,7 @@ public class NotificationManagementController extends BaseController { @PreAuthorize("@ss.hasPermi('routine:NotificationManagement:list')") @GetMapping("/gradeList") @ApiOperation("获取年级列表") - public AjaxResult getGradeList() - { + public AjaxResult getGradeList() { List gradeList = notificationManagementService.getGradeList(); return success(gradeList); } @@ -121,8 +117,7 @@ public class NotificationManagementController extends BaseController { @Log(title = "按年级发送通知", businessType = BusinessType.INSERT) @PostMapping("/sendByGrades") @ApiOperation("按年级发送通知") - public AjaxResult sendNotificationByGrades(@RequestBody SendNotificationDto sendNotificationDto) - { + public AjaxResult sendNotificationByGrades(@RequestBody SendNotificationDto sendNotificationDto) { int result = notificationManagementService.sendNotificationByGrades(sendNotificationDto); return toAjax(result); } @@ -133,8 +128,7 @@ public class NotificationManagementController extends BaseController { @PreAuthorize("@ss.hasPermi('routine:NotificationManagement:list')") @GetMapping("/my-sent") @ApiOperation("查询当前用户发送的通知列表") - public TableDataInfo mySentList(NotificationManagement notificationManagement) - { + public TableDataInfo mySentList(NotificationManagement notificationManagement) { startPage(); List list = notificationManagementService.selectNotificationManagementListBySender(notificationManagement); return getDataTable(list); diff --git a/srs-routine/src/main/java/com/srs/routine/service/impl/NotificationManagementServiceImpl.java b/srs-routine/src/main/java/com/srs/routine/service/impl/NotificationManagementServiceImpl.java index d9e10e3..a470619 100644 --- a/srs-routine/src/main/java/com/srs/routine/service/impl/NotificationManagementServiceImpl.java +++ b/srs-routine/src/main/java/com/srs/routine/service/impl/NotificationManagementServiceImpl.java @@ -139,7 +139,12 @@ public class NotificationManagementServiceImpl extends ServiceImpl 0){ + // todo 给这些学生发送企业微信消息 + // 先给:20200016 + } + return i; } /**