类型转换

main
JH 10 months ago
parent 1fda200534
commit 828d79afda

@ -394,7 +394,7 @@ public class CMSSongService {
s3Service.uploadText(Constants.BUCKET, key, lyric);
List<JournalSong> bySongId = journalSongDao.findBySongId(id);
for (JournalSong item : bySongId) {
String format = String.format("%05d/%02d", item.getJournalNo(), item.getSongNo());
String format = String.format("%05d/%02d", Integer.parseInt(item.getJournalNo()), item.getSongNo());
String destLyricSuffix = format + ".lyric";
String destLyric = Constants.MUSIC_KEY_PREFIX + destLyricSuffix;
s3Service.copy(Constants.BUCKET, key, destLyric);

@ -40,7 +40,7 @@ public class S3Service {
public void fromSongToMusic(List<JournalSong> journalSongList) {
for (JournalSong item : journalSongList) {
String tempLyric = null;
String format = String.format("%05d/%02d", item.getJournalNo(), item.getSongNo());
String format = String.format("%05d/%02d", Integer.parseInt(item.getJournalNo()), item.getSongNo());
if (StringUtils.isNotBlank(item.getUrl())) {
String srcUrl = item.getUrl();
String destUrlSuffix = format + srcUrl.substring(srcUrl.lastIndexOf(Constants.DOT));

Loading…
Cancel
Save