|
|
@@ -128,11 +128,13 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
if (!user.getMode().equals(conversation.getMode())) {
|
|
|
throw BusinessRuntimeException.getInstance("当前出图模式与关联任务出图模式不符");
|
|
|
}
|
|
|
- Jsons.parseList(conversation.getButtons(), MessageButton.class).forEach(button -> {
|
|
|
- if (button.getCustomId().equals(customId)) {
|
|
|
- button.setStyle(3);
|
|
|
- }
|
|
|
- });
|
|
|
+ if (StringUtils.isNotBlank(conversation.getButtons())){
|
|
|
+ Jsons.parseList(conversation.getButtons(), MessageButton.class).forEach(button -> {
|
|
|
+ if (button.getCustomId().equals(customId)) {
|
|
|
+ button.setStyle(3);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
conversationMapper.updateById(conversation);
|
|
|
Map<String, Object> param = MapUtil.builder(new HashMap<String,Object>())
|
|
|
.put("taskId", taskId).put("state", user.getId()).put("customId", customId).build();
|