-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(portal): Fix the processing logic when the consumer obtains an em…
…pty quota
- Loading branch information
Showing
1 changed file
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,7 @@ | |
import java.util.List; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
import org.springframework.util.CollectionUtils; | ||
|
||
/** | ||
* @author Jason Song([email protected]) | ||
|
@@ -233,7 +234,11 @@ private boolean isAllowCreateApplication(Long consumerId) { | |
} | ||
|
||
private Integer getRateLimit(Long consumerId) { | ||
return getRateLimit(Collections.singletonList(consumerId)).get(0); | ||
List<Integer> list = getRateLimit(Collections.singletonList(consumerId)); | ||
if(CollectionUtils.isEmpty(list)){ | ||
return 0; | ||
} | ||
return list.get(0); | ||
} | ||
|
||
private List<Boolean> isAllowCreateApplication(List<Long> consumerIdList) { | ||
|