|
@@ -731,8 +731,8 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
Integer mode = dbConversation.getMode();
|
|
Integer mode = dbConversation.getMode();
|
|
|
if (mode == 1){
|
|
if (mode == 1){
|
|
|
num = redisService.incr(RedisService.key.MIDJOURNEY_FAST_LIMIT.getName() + userId, 1L);
|
|
num = redisService.incr(RedisService.key.MIDJOURNEY_FAST_LIMIT.getName() + userId, 1L);
|
|
|
- midjourneyUserMapper.update(null, wrapper);
|
|
|
|
|
wrapper.set(MidjourneyUser::getMjFastNum, num);
|
|
wrapper.set(MidjourneyUser::getMjFastNum, num);
|
|
|
|
|
+ midjourneyUserMapper.update(null, wrapper);
|
|
|
}
|
|
}
|
|
|
if (mode == 2){
|
|
if (mode == 2){
|
|
|
if (num != null) {
|
|
if (num != null) {
|
|
@@ -936,7 +936,13 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
jsonObject.remove("notifyHook");
|
|
jsonObject.remove("notifyHook");
|
|
|
jsonObject.remove("nonce");
|
|
jsonObject.remove("nonce");
|
|
|
String content = jsonObject.getStr("messageContent");
|
|
String content = jsonObject.getStr("messageContent");
|
|
|
- jsonObject.set("messageContent", replaceUserId(content,"mj"));
|
|
|
|
|
|
|
+ if(StringUtils.isNotBlank(content)){
|
|
|
|
|
+ try {
|
|
|
|
|
+ jsonObject.set("messageContent", replaceUserId(content,"mj"));
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
|
+ log.error("mj回调 发送消息 替换用户ID错误",e);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
conversation.setProperties(jsonObject.toString());
|
|
conversation.setProperties(jsonObject.toString());
|
|
|
}
|
|
}
|
|
|
|
|
|