| Line 126... |
Line 126... |
| 126 |
if(bestSellerCatalogIds.size() < bestSellerCount)
|
126 |
if(bestSellerCatalogIds.size() < bestSellerCount)
|
| 127 |
bestSellerCount = bestSellerCatalogIds.size();
|
127 |
bestSellerCount = bestSellerCatalogIds.size();
|
| 128 |
|
128 |
|
| 129 |
//Get top 12 latest arrivals b'coz 4 of them may overlap with best deals
|
129 |
//Get top 12 latest arrivals b'coz 4 of them may overlap with best deals
|
| 130 |
//while another 4 may overlap with best sellers.
|
130 |
//while another 4 may overlap with best sellers.
|
| 131 |
latestArrivalCatalogIds = client.getLatestArrivalsCatalogIds(0, 12, null, Arrays.asList(new Long[]{ 10002L, 10003L, 10010L, 10050L}));
|
131 |
latestArrivalCatalogIds = client.getLatestArrivalsCatalogIds(0, 12, null, Arrays.asList(new Long[]{ 10002L, 10003L, 10004L, 10010L, 10050L}));
|
| 132 |
latestArrivalCatalogIds.removeAll(bestDealCatalogIds);
|
132 |
latestArrivalCatalogIds.removeAll(bestDealCatalogIds);
|
| 133 |
latestArrivalCatalogIds.removeAll(bestSellerCatalogIds.subList(0, bestSellerCount)); //We're only considering the first 4 best sellers for removal.
|
133 |
latestArrivalCatalogIds.removeAll(bestSellerCatalogIds.subList(0, bestSellerCount)); //We're only considering the first 4 best sellers for removal.
|
| 134 |
if(latestArrivalCatalogIds.size() < latestArrivalCount)
|
134 |
if(latestArrivalCatalogIds.size() < latestArrivalCount)
|
| 135 |
latestArrivalCount = latestArrivalCatalogIds.size();
|
135 |
latestArrivalCount = latestArrivalCatalogIds.size();
|
| 136 |
} catch (InventoryServiceException e) {
|
136 |
} catch (InventoryServiceException e) {
|