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,9 +84,9 @@ public class SysNoticeController extends BaseController | ||
| 84 | */ | 84 | */ |
| 85 | @PreAuthorize("@ss.hasPermi('system:notice:remove')") | 85 | @PreAuthorize("@ss.hasPermi('system:notice:remove')") |
| 86 | @Log(title = "通知公告", businessType = BusinessType.DELETE) | 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
| @@ -56,5 +56,5 @@ public interface SysNoticeMapper | @@ -56,5 +56,5 @@ public interface SysNoticeMapper | ||
| 56 | * @param noticeIds 需要删除的公告ID | 56 | * @param noticeIds 需要删除的公告ID |
| 57 | * @return 结果 | 57 | * @return 结果 |
| 58 | */ | 58 | */ |
| 59 | - public int deleteNoticeByIds(Long noticeIds); | 59 | + public int deleteNoticeByIds(Long[] noticeIds); |
| 60 | } | 60 | } |
| 61 | \ No newline at end of file | 61 | \ No newline at end of file |
ruoyi/src/main/java/com/ruoyi/project/system/service/ISysNoticeService.java
| @@ -56,5 +56,5 @@ public interface ISysNoticeService | @@ -56,5 +56,5 @@ public interface ISysNoticeService | ||
| 56 | * @param noticeIds 需要删除的公告ID | 56 | * @param noticeIds 需要删除的公告ID |
| 57 | * @return 结果 | 57 | * @return 结果 |
| 58 | */ | 58 | */ |
| 59 | - public int deleteNoticeByIds(Long noticeIds); | 59 | + public int deleteNoticeByIds(Long[] noticeIds); |
| 60 | } | 60 | } |
ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysNoticeServiceImpl.java
| @@ -84,7 +84,7 @@ public class SysNoticeServiceImpl implements ISysNoticeService | @@ -84,7 +84,7 @@ public class SysNoticeServiceImpl implements ISysNoticeService | ||
| 84 | * @param noticeIds 需要删除的公告ID | 84 | * @param noticeIds 需要删除的公告ID |
| 85 | * @return 结果 | 85 | * @return 结果 |
| 86 | */ | 86 | */ |
| 87 | - public int deleteNoticeByIds(Long noticeIds) | 87 | + public int deleteNoticeByIds(Long[] noticeIds) |
| 88 | { | 88 | { |
| 89 | return noticeMapper.deleteNoticeByIds(noticeIds); | 89 | return noticeMapper.deleteNoticeByIds(noticeIds); |
| 90 | } | 90 | } |