From 375b517b2047d688e7b8cce79a2b72c2584bf17c Mon Sep 17 00:00:00 2001 From: JH <935007339@qq.com> Date: Sun, 28 Jan 2024 17:22:32 +0800 Subject: [PATCH] update --- .../src/main/java/com/luoo/music/service/CMSSongService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luoo_music/src/main/java/com/luoo/music/service/CMSSongService.java b/luoo_music/src/main/java/com/luoo/music/service/CMSSongService.java index 647ca8f..43492ab 100644 --- a/luoo_music/src/main/java/com/luoo/music/service/CMSSongService.java +++ b/luoo_music/src/main/java/com/luoo/music/service/CMSSongService.java @@ -417,8 +417,8 @@ public class CMSSongService { */ public Result deleteById(String id) { List journalsBySongId = journalSongDao.findJournalBySongId(id); - if (CollectionUtils.isEmpty(journalsBySongId)) { - return Result.success("该歌曲被期刊使用,删除失败"); + if (!CollectionUtils.isEmpty(journalsBySongId)) { + return Result.failed("该歌曲被期刊使用,删除失败"); } else { songDao.deleteById(id); songTagDao.deleteBySongId(id);