From b7198dd41483b4f8ddadab962514020ac2489935 Mon Sep 17 00:00:00 2001 From: JH <935007339@qq.com> Date: Sun, 3 Mar 2024 23:08:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E9=97=B4=E8=A1=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/luoo/music/pojo/JournalSong.java | 5 +++++ .../main/java/com/luoo/music/service/CMSJournalService.java | 4 +++- luoo_music/src/main/java/com/luoo/music/util/Constants.java | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/luoo_music/src/main/java/com/luoo/music/pojo/JournalSong.java b/luoo_music/src/main/java/com/luoo/music/pojo/JournalSong.java index 82054c6..658f6b4 100644 --- a/luoo_music/src/main/java/com/luoo/music/pojo/JournalSong.java +++ b/luoo_music/src/main/java/com/luoo/music/pojo/JournalSong.java @@ -57,4 +57,9 @@ public class JournalSong implements Serializable{ * 歌词路径 */ private String lyricUrl; + + /** + * 期刊编号_歌曲ID拼接 + */ + private String journalNoSongId; } diff --git a/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java b/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java index b5d06a5..c29f48e 100644 --- a/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java +++ b/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java @@ -305,7 +305,9 @@ public class CMSJournalService { } else { journalSong.setLyricUrl(song.getLyricUrl()); } - journalSongList.add(journalSong); + String journalNoSongId = String.format("%s%s/%s", param.getJournalNo(), Constants.UNDERSCORE, item); + journalSong.setJournalNoSongId(journalNoSongId); + journalSongList.add(journalSong); } } journalSongDao.saveAll(journalSongList); diff --git a/luoo_music/src/main/java/com/luoo/music/util/Constants.java b/luoo_music/src/main/java/com/luoo/music/util/Constants.java index 191db5a..8c878b3 100644 --- a/luoo_music/src/main/java/com/luoo/music/util/Constants.java +++ b/luoo_music/src/main/java/com/luoo/music/util/Constants.java @@ -33,4 +33,6 @@ public class Constants { public static final String DOT = "."; public static final String COMMA = ","; + // _ 下划线 + public static final String UNDERSCORE = "_"; }