Commit 7604d59e498cc05f6a5f3744d449c9023d3b571b

Authored by RuoYi
1 parent 02062f31

修复通知公告批量删除异常问题

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
... ... @@ -56,5 +56,5 @@ public interface SysNoticeMapper
56 56 * @param noticeIds 需要删除的公告ID
57 57 * @return 结果
58 58 */
59   - public int deleteNoticeByIds(Long noticeIds);
  59 + public int deleteNoticeByIds(Long[] noticeIds);
60 60 }
61 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 56 * @param noticeIds 需要删除的公告ID
57 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 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 }
... ...