|
|
@@ -78,7 +78,7 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
|
|
|
private final MidjourneyUserConversationMapper conversationMapper;
|
|
|
|
|
|
- private static final List<String> progress = List.of("35%","65","100%");
|
|
|
+ private static final List<String> progress = List.of("35%","65%","100%");
|
|
|
|
|
|
private static final List<String> status = List.of("MODAL","CANCEL","FAILURE");
|
|
|
|
|
|
@@ -694,7 +694,16 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
}else {
|
|
|
- list.add((MidjourneyUserConversation) redisService.get(RedisService.key.MIDJOURNEY_CONVERSATION.getName() + id));
|
|
|
+ Object obj = redisService.get(RedisService.key.MIDJOURNEY_CONVERSATION.getName() + id);
|
|
|
+ MidjourneyUserConversation conversation;
|
|
|
+ try {
|
|
|
+ conversation = (MidjourneyUserConversation)obj;
|
|
|
+ }catch (Exception e){
|
|
|
+ String jsonStr = JSONUtil.toJsonStr(obj);
|
|
|
+ conversation = JSONUtil.parseObj(jsonStr).toBean(MidjourneyUserConversation.class);
|
|
|
+ redisService.set(RedisService.key.MIDJOURNEY_CONVERSATION.getName() + id, conversation, RedisService.key.MIDJOURNEY_CONVERSATION.getTimeout());
|
|
|
+ }
|
|
|
+ list.add(conversation);
|
|
|
}
|
|
|
});
|
|
|
return list;
|