From c0c2305c23e24a6a06243b357b9c9b690555e18e Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 5 Jun 2024 10:31:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E9=87=8D=E5=91=BD=E5=90=8D=20job=20id=20=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20task=20id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/ai/dal/dataobject/image/AiImageDO.java | 6 +++--- .../yudao/module/ai/dal/mysql/image/AiImageMapper.java | 2 +- .../yudao/module/ai/service/image/AiImageServiceImpl.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index ee42db3ed..378b09940 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -111,11 +111,11 @@ public class AiImageDO extends BaseDO { @TableField(typeHandler = JacksonTypeHandler.class) private List buttons; - // TODO @芋艿:再瞅瞅 /** - * midjourney proxy 关联的 job id + * midjourney proxy 关联的 task id */ - private String jobId; + private String taskId; + /** * 绘画错误信息 */ diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java index aada8a661..c3599c0a1 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/mysql/image/AiImageMapper.java @@ -34,7 +34,7 @@ public interface AiImageMapper extends BaseMapperX { * @return */ default AiImageDO selectByJobId(String id) { - return this.selectOne(new LambdaQueryWrapperX().eq(AiImageDO::getJobId, id)); + return this.selectOne(new LambdaQueryWrapperX().eq(AiImageDO::getTaskId, id)); } default PageResult selectPage(Long userId, PageParam pageReqVO) { diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java index 4074b210b..b99c951e9 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/image/AiImageServiceImpl.java @@ -158,7 +158,7 @@ public class AiImageServiceImpl implements AiImageService { } imageMapper.updateById(new AiImageDO() .setId(aiImageDO.getId()) - .setJobId(submitRespVO.getResult()) + .setTaskId(submitRespVO.getResult()) ); return aiImageDO.getId(); } @@ -228,7 +228,7 @@ public class AiImageServiceImpl implements AiImageService { midjourneyProxyClient.action( new MidjourneyActionReqVO() .setCustomId(customId) - .setTaskId(aiImageDO.getJobId()) + .setTaskId(aiImageDO.getTaskId()) .setNotifyHook(midjourneyNotifyUrl) ); return Boolean.TRUE;