|
@@ -159,7 +159,10 @@ public class UserAuthInfoInfoServiceImpl extends ServiceImpl<IUserAuthInfoMapper
|
|
|
return;
|
|
|
}
|
|
|
if(type == CountType.REDUCE.code()){
|
|
|
- redisUtil.decr(String.format(RedisKey.API_METHOD_COUNT, appKey), count);
|
|
|
+ long decr = redisUtil.decr(String.format(RedisKey.API_METHOD_COUNT, appKey), count);
|
|
|
+ if(decr < 0){
|
|
|
+ redisUtil.set(String.format(RedisKey.API_METHOD_COUNT, appKey), "0");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|