| Line 10... |
Line 10... |
| 10 |
import in.shop2020.utils.DataLogger;
|
10 |
import in.shop2020.utils.DataLogger;
|
| 11 |
|
11 |
|
| 12 |
import java.io.File;
|
12 |
import java.io.File;
|
| 13 |
import java.io.IOException;
|
13 |
import java.io.IOException;
|
| 14 |
import java.util.ArrayList;
|
14 |
import java.util.ArrayList;
|
| - |
|
15 |
import java.util.Arrays;
|
| 15 |
import java.util.List;
|
16 |
import java.util.List;
|
| 16 |
|
17 |
|
| 17 |
import net.sf.ehcache.CacheManager;
|
18 |
import net.sf.ehcache.CacheManager;
|
| 18 |
|
19 |
|
| 19 |
import org.apache.log4j.Logger;
|
20 |
import org.apache.log4j.Logger;
|
| Line 123... |
Line 124... |
| 123 |
if(bestSellerCatalogIds.size() < bestSellerCount)
|
124 |
if(bestSellerCatalogIds.size() < bestSellerCount)
|
| 124 |
bestSellerCount = bestSellerCatalogIds.size();
|
125 |
bestSellerCount = bestSellerCatalogIds.size();
|
| 125 |
|
126 |
|
| 126 |
//Get top 12 latest arrivals b'coz 4 of them may overlap with best deals
|
127 |
//Get top 12 latest arrivals b'coz 4 of them may overlap with best deals
|
| 127 |
//while another 4 may overlap with best sellers.
|
128 |
//while another 4 may overlap with best sellers.
|
| 128 |
List<Long> latestArrivalCategories = new ArrayList<Long>();
|
- |
|
| 129 |
latestArrivalCategories.add(10002L);
|
- |
|
| 130 |
latestArrivalCategories.add(10003L);
|
- |
|
| 131 |
latestArrivalCatalogIds = client.getLatestArrivalsCatalogIds(0, 12, null, latestArrivalCategories);
|
129 |
latestArrivalCatalogIds = client.getLatestArrivalsCatalogIds(0, 12, null, Arrays.asList(new Long[]{ 10002L, 10003L, 10010L}));
|
| 132 |
latestArrivalCatalogIds.removeAll(bestDealCatalogIds);
|
130 |
latestArrivalCatalogIds.removeAll(bestDealCatalogIds);
|
| 133 |
latestArrivalCatalogIds.removeAll(bestSellerCatalogIds.subList(0, bestSellerCount)); //We're only considering the first 4 best sellers for removal.
|
131 |
latestArrivalCatalogIds.removeAll(bestSellerCatalogIds.subList(0, bestSellerCount)); //We're only considering the first 4 best sellers for removal.
|
| 134 |
if(latestArrivalCatalogIds.size() < latestArrivalCount)
|
132 |
if(latestArrivalCatalogIds.size() < latestArrivalCount)
|
| 135 |
latestArrivalCount = latestArrivalCatalogIds.size();
|
133 |
latestArrivalCount = latestArrivalCatalogIds.size();
|
| 136 |
} catch (InventoryServiceException e) {
|
134 |
} catch (InventoryServiceException e) {
|