From 44a0b04d0e4c133b7576241804dbae43025908ba Mon Sep 17 00:00:00 2001 From: xiaoxin <718949661@qq.com> Date: Wed, 26 Jun 2024 22:55:04 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo=E3=80=91AI=20Mu?= =?UTF-8?q?sic=EF=BC=9A=E5=90=8C=E7=B1=BB=E5=8F=98=E9=87=8F=E5=90=8C?= =?UTF-8?q?=E8=A1=8C=EF=BC=8C=E9=81=BF=E5=85=8D=E8=BF=87=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/service/music/AiMusicServiceImpl.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/AiMusicServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/AiMusicServiceImpl.java index add71b1dd..29af1c8b3 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/AiMusicServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/music/AiMusicServiceImpl.java @@ -93,19 +93,12 @@ public class AiMusicServiceImpl implements AiMusicService { * @return AiMusicDO 集合 */ private static List buildMusicDOList(List musicTaskList) { - // TODO @xin:想通的变量,放在同一行,避免过长。 return CollectionUtils.convertList(musicTaskList, musicData -> new AiMusicDO() .setTaskId(musicData.id()) - .setPrompt(musicData.prompt()) - .setGptDescriptionPrompt(musicData.gptDescriptionPrompt()) - .setAudioUrl(musicData.audioUrl()) - .setVideoUrl(musicData.videoUrl()) - .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))); - } + .setPrompt(musicData.prompt()).setGptDescriptionPrompt(musicData.gptDescriptionPrompt()) + .setAudioUrl(musicData.audioUrl()).setVideoUrl(musicData.videoUrl()).setImageUrl(musicData.imageUrl()) + .setTitle(musicData.title()).setLyric(musicData.lyric()).setTags(StrUtil.split(musicData.tags(), StrPool.COMMA)) + .setModel(musicData.modelName()).setStatus(Objects.equals("complete", musicData.status()) ? AiMusicStatusEnum.COMPLETE.getStatus() : AiMusicStatusEnum.STREAMING.getStatus())); + } }