mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-30 03:01:53 +08:00
【解决todo】AI Music:同类变量同行,避免过长
This commit is contained in:
parent
8bbd2257f2
commit
44a0b04d0e
@ -93,19 +93,12 @@ public class AiMusicServiceImpl implements AiMusicService {
|
|||||||
* @return AiMusicDO 集合
|
* @return AiMusicDO 集合
|
||||||
*/
|
*/
|
||||||
private static List<AiMusicDO> buildMusicDOList(List<SunoApi.MusicData> musicTaskList) {
|
private static List<AiMusicDO> buildMusicDOList(List<SunoApi.MusicData> musicTaskList) {
|
||||||
// TODO @xin:想通的变量,放在同一行,避免过长。
|
|
||||||
return CollectionUtils.convertList(musicTaskList, musicData -> new AiMusicDO()
|
return CollectionUtils.convertList(musicTaskList, musicData -> new AiMusicDO()
|
||||||
.setTaskId(musicData.id())
|
.setTaskId(musicData.id())
|
||||||
.setPrompt(musicData.prompt())
|
.setPrompt(musicData.prompt()).setGptDescriptionPrompt(musicData.gptDescriptionPrompt())
|
||||||
.setGptDescriptionPrompt(musicData.gptDescriptionPrompt())
|
.setAudioUrl(musicData.audioUrl()).setVideoUrl(musicData.videoUrl()).setImageUrl(musicData.imageUrl())
|
||||||
.setAudioUrl(musicData.audioUrl())
|
.setTitle(musicData.title()).setLyric(musicData.lyric()).setTags(StrUtil.split(musicData.tags(), StrPool.COMMA))
|
||||||
.setVideoUrl(musicData.videoUrl())
|
.setModel(musicData.modelName()).setStatus(Objects.equals("complete", musicData.status()) ? AiMusicStatusEnum.COMPLETE.getStatus() : AiMusicStatusEnum.STREAMING.getStatus()));
|
||||||
.setImageUrl(musicData.imageUrl())
|
|
||||||
.setLyric(musicData.lyric())
|
|
||||||
.setTitle(musicData.title())
|
|
||||||
.setStatus(Objects.equals("complete", musicData.status()) ? AiMusicStatusEnum.COMPLETE.getStatus() : AiMusicStatusEnum.STREAMING.getStatus())
|
|
||||||
.setModel(musicData.modelName())
|
|
||||||
.setTags(StrUtil.split(musicData.tags(), StrPool.COMMA)));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user