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 = "_"; }