|
@@ -1,5 +1,6 @@
|
|
|
package com.yhlxj.service.midjourney.impl;
|
|
package com.yhlxj.service.midjourney.impl;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
import cn.hutool.core.map.MapUtil;
|
|
import cn.hutool.core.map.MapUtil;
|
|
@@ -78,7 +79,7 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
|
|
|
|
|
private final MidjourneyUserConversationMapper conversationMapper;
|
|
private final MidjourneyUserConversationMapper conversationMapper;
|
|
|
|
|
|
|
|
- private static final List<String> progress = List.of("100%");
|
|
|
|
|
|
|
+ private static final List<String> progress = List.of("35%","65%","100%");
|
|
|
|
|
|
|
|
private static final List<String> status = List.of("MODAL","CANCEL","FAILURE");
|
|
private static final List<String> status = List.of("MODAL","CANCEL","FAILURE");
|
|
|
|
|
|
|
@@ -978,7 +979,9 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
|
|
|
|
|
TASK_EXECUTOR.execute(() -> {
|
|
TASK_EXECUTOR.execute(() -> {
|
|
|
try {
|
|
try {
|
|
|
- sync(conversation);
|
|
|
|
|
|
|
+ MidjourneyUserConversation conversation1 = new MidjourneyUserConversation();
|
|
|
|
|
+ BeanUtil.copyProperties(conversation, conversation1);
|
|
|
|
|
+ sync(conversation1);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.error("同步任务出错 taskId:{}, error:{}", conversation.getTaskId(), StringUtil.getErrorText(e));
|
|
log.error("同步任务出错 taskId:{}, error:{}", conversation.getTaskId(), StringUtil.getErrorText(e));
|
|
|
}
|
|
}
|
|
@@ -1010,7 +1013,6 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
//WebSocket 直接发送 任务状态
|
|
//WebSocket 直接发送 任务状态
|
|
|
WssSession wssSession = WSS_SESSION_MAP.get(conversation.getUserId());
|
|
WssSession wssSession = WSS_SESSION_MAP.get(conversation.getUserId());
|
|
|
if (wssSession != null) {
|
|
if (wssSession != null) {
|
|
|
- conversation.setUserId(null);
|
|
|
|
|
conversation.setChannelId(null);
|
|
conversation.setChannelId(null);
|
|
|
conversation.setInstanceId(null);
|
|
conversation.setInstanceId(null);
|
|
|
if(JSONUtil.isJson(conversation.getProperties())){
|
|
if(JSONUtil.isJson(conversation.getProperties())){
|