|
|
@ -417,8 +417,8 @@ public class CMSSongService {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public Result deleteById(String id) {
|
|
|
|
public Result deleteById(String id) {
|
|
|
|
List<String> journalsBySongId = journalSongDao.findJournalBySongId(id);
|
|
|
|
List<String> journalsBySongId = journalSongDao.findJournalBySongId(id);
|
|
|
|
if (CollectionUtils.isEmpty(journalsBySongId)) {
|
|
|
|
if (!CollectionUtils.isEmpty(journalsBySongId)) {
|
|
|
|
return Result.success("该歌曲被期刊使用,删除失败");
|
|
|
|
return Result.failed("该歌曲被期刊使用,删除失败");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
songDao.deleteById(id);
|
|
|
|
songDao.deleteById(id);
|
|
|
|
songTagDao.deleteBySongId(id);
|
|
|
|
songTagDao.deleteBySongId(id);
|
|
|
|