From f6de03a009fc1f2d8755f33882b259f3c54d531a Mon Sep 17 00:00:00 2001
From: abbfun <819589789@qq.com>
Date: 星期五, 19 六月 2020 10:00:41 +0800
Subject: [PATCH] update ruoyi-ui/src/views/monitor/job/log.vue. data对象中属性【表单参数form】重复

---
 ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java b/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java
index 8bd3985..9f00392 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java
@@ -3,6 +3,7 @@
 import java.util.List;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -60,7 +61,7 @@
     @PreAuthorize("@ss.hasPermi('system:notice:add')")
     @Log(title = "通知公告", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody SysNotice notice)
+    public AjaxResult add(@Validated @RequestBody SysNotice notice)
     {
         notice.setCreateBy(SecurityUtils.getUsername());
         return toAjax(noticeService.insertNotice(notice));
@@ -72,7 +73,7 @@
     @PreAuthorize("@ss.hasPermi('system:notice:edit')")
     @Log(title = "通知公告", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody SysNotice notice)
+    public AjaxResult edit(@Validated @RequestBody SysNotice notice)
     {
         notice.setUpdateBy(SecurityUtils.getUsername());
         return toAjax(noticeService.updateNotice(notice));
@@ -83,9 +84,9 @@
      */
     @PreAuthorize("@ss.hasPermi('system:notice:remove')")
     @Log(title = "通知公告", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{noticeId}")
-    public AjaxResult remove(@PathVariable Long noticeId)
+    @DeleteMapping("/{noticeIds}")
+    public AjaxResult remove(@PathVariable Long[] noticeIds)
     {
-        return toAjax(noticeService.deleteNoticeById(noticeId));
+        return toAjax(noticeService.deleteNoticeByIds(noticeIds));
     }
 }

--
Gitblit v1.9.2