Commit 7604d59e498cc05f6a5f3744d449c9023d3b571b
1 parent
02062f31
修复通知公告批量删除异常问题
Showing
4 changed files
with
6 additions
and
6 deletions
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java
| ... | ... | @@ -84,9 +84,9 @@ public class SysNoticeController extends BaseController |
| 84 | 84 | */ |
| 85 | 85 | @PreAuthorize("@ss.hasPermi('system:notice:remove')") |
| 86 | 86 | @Log(title = "通知公告", businessType = BusinessType.DELETE) |
| 87 | - @DeleteMapping("/{noticeId}") | |
| 88 | - public AjaxResult remove(@PathVariable Long noticeId) | |
| 87 | + @DeleteMapping("/{noticeIds}") | |
| 88 | + public AjaxResult remove(@PathVariable Long[] noticeIds) | |
| 89 | 89 | { |
| 90 | - return toAjax(noticeService.deleteNoticeById(noticeId)); | |
| 90 | + return toAjax(noticeService.deleteNoticeByIds(noticeIds)); | |
| 91 | 91 | } |
| 92 | 92 | } | ... | ... |
ruoyi/src/main/java/com/ruoyi/project/system/mapper/SysNoticeMapper.java
ruoyi/src/main/java/com/ruoyi/project/system/service/ISysNoticeService.java
ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysNoticeServiceImpl.java
| ... | ... | @@ -84,7 +84,7 @@ public class SysNoticeServiceImpl implements ISysNoticeService |
| 84 | 84 | * @param noticeIds 需要删除的公告ID |
| 85 | 85 | * @return 结果 |
| 86 | 86 | */ |
| 87 | - public int deleteNoticeByIds(Long noticeIds) | |
| 87 | + public int deleteNoticeByIds(Long[] noticeIds) | |
| 88 | 88 | { |
| 89 | 89 | return noticeMapper.deleteNoticeByIds(noticeIds); |
| 90 | 90 | } | ... | ... |