|
|
@@ -479,7 +479,6 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
}
|
|
|
param.put("accountFilter",MapUtil.builder(new HashMap<String,Object>())
|
|
|
.put("instanceId",accountWithMinUsage).build());
|
|
|
- userSubmitLimit(user,action,param.get("customId"));
|
|
|
}
|
|
|
SubmitResult submitResult = submit2MjProxy(url, token, mode, action, param);
|
|
|
int code = submitResult.getCode();
|
|
|
@@ -534,6 +533,7 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(accountWithMinUsage) && mode == 2) {
|
|
|
submitResult.setInstanceId(Long.valueOf(accountWithMinUsage));
|
|
|
+ userSubmitLimit(user,action,param.get("customId"));
|
|
|
}
|
|
|
return submitResult;
|
|
|
}
|
|
|
@@ -567,9 +567,10 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
|
|
|
Long userId = user.getId();
|
|
|
String key = RedisService.key.MIDJOURNEY_USER_TIME.getName() + userId;
|
|
|
- Long submitCount = (Long) redisService.get(key);
|
|
|
+ Long submitCount;
|
|
|
+ String str = redisService.getStr(key);
|
|
|
|
|
|
- if (submitCount == null) {
|
|
|
+ if (StringUtils.isBlank(str)) {
|
|
|
redisService.set(key, 1L, RedisService.key.MIDJOURNEY_USER_TIME.getTimeout());
|
|
|
submitCount = 1L;
|
|
|
} else {
|