|
|
@@ -271,14 +271,17 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
accountWithMinUsage = getAccountWithMinUsage(instanceId);
|
|
|
param.put("accountFilter",MapUtil.builder(new HashMap<String,Object>())
|
|
|
.put("instanceId",accountWithMinUsage).build());
|
|
|
- String key = RedisService.key.MIDJOURNEY_USER_TIME.getName() + user.getId();
|
|
|
- Object count = redisService.get(key);
|
|
|
- if (count == null) {
|
|
|
- redisService.set(key, 1L,RedisService.key.MIDJOURNEY_USER_TIME.getTimeout());
|
|
|
- }else {
|
|
|
- if (redisService.incr(key, 1L) > 200) {
|
|
|
- user.setIsBlack(true);
|
|
|
- midjourneyUserMapper.updateById(user);
|
|
|
+ Object customId = param.get("customId");
|
|
|
+ if (customId != null && !customId.toString().contains("upsample") && !action.equals("modal")){
|
|
|
+ String key = RedisService.key.MIDJOURNEY_USER_TIME.getName() + user.getId();
|
|
|
+ Object count = redisService.get(key);
|
|
|
+ if (count == null) {
|
|
|
+ redisService.set(key, 1L,RedisService.key.MIDJOURNEY_USER_TIME.getTimeout());
|
|
|
+ }else {
|
|
|
+ if (redisService.incr(key, 1L) > 200) {
|
|
|
+ user.setIsBlack(true);
|
|
|
+ midjourneyUserMapper.updateById(user);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|