Skip to content

Instantly share code, notes, and snippets.

@sirech
Created May 8, 2022 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sirech/e269d6639172ad6a236c4a6a030f53e2 to your computer and use it in GitHub Desktop.
Save sirech/e269d6639172ad6a236c4a6a030f53e2 to your computer and use it in GitHub Desktop.
private SyncFallbackCache<Collection<SupplierUserPermission>> permissions;
private Collection<SupplierUserPermission> getPermissions(
int userId,
int supplierId) {
return permissions.get(
() -> String.format("id:%s;suId:%s", userId, supplierId),
() -> client.getUserPermissions(userId, supplierId)
.getData()
.getSupplierUserMyInformation()
.getPermissions()
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment