From d29fe10b9346aec0bb1aff1ebf1fe9fa9c41d45f Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期五, 17 七月 2020 16:20:31 +0800 Subject: [PATCH] 删除babel,提高编译速度。 --- 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