优化
This commit is contained in:
+3
@@ -40,6 +40,9 @@ public class PartnerWarehouseDirectory {
|
||||
.map(value -> new OverseasQuoteResponses.PartnerWarehouseOption(value.id().toString(),
|
||||
value.warehouseCode(), value.warehouseName(), value.countryCode()))
|
||||
.toList();
|
||||
// An empty directory can be a short-lived cross-region visibility gap after a partner
|
||||
// warehouse is created. Do not preserve that absence for the normal 30-minute TTL.
|
||||
if (options.isEmpty()) return List.of();
|
||||
snapshot = new Snapshot(options, now.plus(ttl));
|
||||
return snapshot.options();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user