|
@@ -293,8 +293,8 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
throw BusinessRuntimeException.getInstance(submitResult.getDescription());
|
|
throw BusinessRuntimeException.getInstance(submitResult.getDescription());
|
|
|
}
|
|
}
|
|
|
if (code == 24) {
|
|
if (code == 24) {
|
|
|
- JSONObject jsonObject = JSONUtil.parseObj(submitResult.getResult());
|
|
|
|
|
- throw BusinessRuntimeException.getInstance("prompt包含敏感词:"+jsonObject.getStr("bannedWord"));
|
|
|
|
|
|
|
+ Map<String, Object> properties = submitResult.getProperties();
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("prompt包含敏感词:"+properties.get("bannedWord"));
|
|
|
}
|
|
}
|
|
|
log.error("action:" + action + " error message:" + submitResult.getDescription());
|
|
log.error("action:" + action + " error message:" + submitResult.getDescription());
|
|
|
throw BusinessRuntimeException.getInstance("队列已满,请稍后尝试");
|
|
throw BusinessRuntimeException.getInstance("队列已满,请稍后尝试");
|
|
@@ -431,14 +431,15 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
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);
|
|
|
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) {
|
|
|
num = redisService.incr(RedisService.key.MIDJOURNEY_RELAX_LIMIT.getName() + userId, 1L);
|
|
num = redisService.incr(RedisService.key.MIDJOURNEY_RELAX_LIMIT.getName() + userId, 1L);
|
|
|
wrapper.set(MidjourneyUser::getMjRelaxNum, num);
|
|
wrapper.set(MidjourneyUser::getMjRelaxNum, num);
|
|
|
|
|
+ midjourneyUserMapper.update(null, wrapper);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- midjourneyUserMapper.update(null, wrapper);
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|