修改mj message type 类型

This commit is contained in:
cherishsince 2024-04-10 19:42:29 +08:00
parent 32bc632947
commit 8f2ce2faae

View File

@ -63,11 +63,11 @@ public class MidjourneyMessageListener {
private void convertGenerateStatus(MidjourneyMessage mjMessage) { private void convertGenerateStatus(MidjourneyMessage mjMessage) {
if (mjMessage.getType() == 20 && mjMessage.getContent().getStatus().contains("Waiting")) { if (mjMessage.getType() == 20 && mjMessage.getContent().getStatus().contains("Waiting")) {
mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.WAITING.getValue()); mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.WAITING.getStatus());
} else if (mjMessage.getType() == 20 && !StrUtil.isBlank(mjMessage.getContent().getProgress())) { } else if (mjMessage.getType() == 20 && !StrUtil.isBlank(mjMessage.getContent().getProgress())) {
mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.IN_PROGRESS.getValue()); mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.IN_PROGRESS.getStatus());
} else if (mjMessage.getType() == 0 && !CollUtil.isEmpty(mjMessage.getComponents())) { } else if (mjMessage.getType() == 0 && !CollUtil.isEmpty(mjMessage.getComponents())) {
mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.COMPLETED.getValue()); mjMessage.setGenerateStatus(MidjourneyGennerateStatusEnum.COMPLETED.getStatus());
} }
} }