|
|
@@ -621,7 +621,7 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
* 用户生图次数限制
|
|
|
*/
|
|
|
public void userSubmitLimit(MidjourneyUser user,String action,Object customId) {
|
|
|
- if (StringUtils.equals("modal", action) || (customId != null)) {
|
|
|
+ if (StringUtils.equals("modal", action)) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -649,9 +649,8 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
}
|
|
|
|
|
|
// 根据提交次数设置提交间隔
|
|
|
-
|
|
|
long submitInterval;
|
|
|
- if(customId.toString().contains("upsample")){
|
|
|
+ if((customId != null && customId.toString().contains("upsample"))){
|
|
|
submitInterval = 10L;
|
|
|
}else {
|
|
|
if (submitCount >= 140) {
|
|
|
@@ -667,6 +666,7 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
// 用户只能在指定间隔内提交一次
|
|
|
String submitKey = RedisService.key.MIDJOURNEY_USER_SUBMIT.getName() + userId;
|
|
|
if (redisService.hasKey(submitKey)) {
|