| Line 8... |
Line 8... |
| 8 |
import in.shop2020.metamodel.definitions.Category;
|
8 |
import in.shop2020.metamodel.definitions.Category;
|
| 9 |
import in.shop2020.metamodel.definitions.DefinitionsContainer;
|
9 |
import in.shop2020.metamodel.definitions.DefinitionsContainer;
|
| 10 |
import in.shop2020.metamodel.util.CreationUtils;
|
10 |
import in.shop2020.metamodel.util.CreationUtils;
|
| 11 |
import in.shop2020.model.v1.catalog.CatalogService.Client;
|
11 |
import in.shop2020.model.v1.catalog.CatalogService.Client;
|
| 12 |
import in.shop2020.model.v1.catalog.Item;
|
12 |
import in.shop2020.model.v1.catalog.Item;
|
| 13 |
import in.shop2020.model.v1.catalog.ItemShippingInfo;
|
- |
|
| 14 |
import in.shop2020.model.v1.catalog.status;
|
13 |
import in.shop2020.model.v1.catalog.status;
|
| 15 |
import in.shop2020.model.v1.user.ItemCouponDiscount;
|
14 |
import in.shop2020.model.v1.user.ItemCouponDiscount;
|
| 16 |
import in.shop2020.thrift.clients.CatalogClient;
|
15 |
import in.shop2020.thrift.clients.CatalogClient;
|
| 17 |
import in.shop2020.thrift.clients.LogisticsClient;
|
16 |
import in.shop2020.thrift.clients.LogisticsClient;
|
| 18 |
import in.shop2020.thrift.clients.PromotionClient;
|
17 |
import in.shop2020.thrift.clients.PromotionClient;
|
| 19 |
import in.shop2020.utils.ConfigClientKeys;
|
- |
|
| 20 |
import in.shop2020.utils.GmailUtils;
|
18 |
import in.shop2020.utils.GmailUtils;
|
| 21 |
|
19 |
|
| 22 |
import java.io.File;
|
20 |
import java.io.File;
|
| 23 |
import java.io.FileInputStream;
|
21 |
import java.io.FileInputStream;
|
| 24 |
import java.io.FileNotFoundException;
|
22 |
import java.io.FileNotFoundException;
|
| Line 304... |
Line 302... |
| 304 |
LogisticsInfo logisticsInfo = null;
|
302 |
LogisticsInfo logisticsInfo = null;
|
| 305 |
if(prod_client != null){
|
303 |
if(prod_client != null){
|
| 306 |
try {
|
304 |
try {
|
| 307 |
Long itemId = prod_client.getEntityLogisticsEstimation(
|
305 |
Long itemId = prod_client.getEntityLogisticsEstimation(
|
| 308 |
entityId, DEFAULT_PINCODE, DeliveryType.PREPAID)
|
306 |
entityId, DEFAULT_PINCODE, DeliveryType.PREPAID)
|
| 309 |
.get(0);
|
307 |
.get(0).getItemId();
|
| 310 |
logisticsInfo = prod_client.getLogisticsEstimation(itemId,
|
308 |
logisticsInfo = prod_client.getLogisticsEstimation(itemId,
|
| 311 |
DEFAULT_PINCODE, DeliveryType.PREPAID);
|
309 |
DEFAULT_PINCODE, DeliveryType.PREPAID);
|
| 312 |
irDataXMLSnippets.add(this.xmlIndentation[2] + "<ProductDeliveryEstimate>" + logisticsInfo.getDeliveryTime() + "</ProductDeliveryEstimate>");
|
310 |
irDataXMLSnippets.add(this.xmlIndentation[2] + "<ProductDeliveryEstimate>" + logisticsInfo.getDeliveryTime() + "</ProductDeliveryEstimate>");
|
| 313 |
} catch (Exception e1) {
|
311 |
} catch (Exception e1) {
|
| 314 |
Utils.info("Unable to get Estimation for Entity: " + entityId + "\n" + e1);
|
312 |
Utils.info("Unable to get Estimation for Entity: " + entityId + "\n" + e1);
|
| Line 381... |
Line 379... |
| 381 |
accessoriesXMLSnippets.add(this.xmlIndentation[2] + "<ProductMRP>" + getMinMRP(items) + "</ProductMRP>");
|
379 |
accessoriesXMLSnippets.add(this.xmlIndentation[2] + "<ProductMRP>" + getMinMRP(items) + "</ProductMRP>");
|
| 382 |
|
380 |
|
| 383 |
LogisticsInfo logisticsInfo = null;
|
381 |
LogisticsInfo logisticsInfo = null;
|
| 384 |
if(prod_client != null){
|
382 |
if(prod_client != null){
|
| 385 |
try {
|
383 |
try {
|
| 386 |
Long itemId = prod_client.getEntityLogisticsEstimation(entityId, DEFAULT_PINCODE, DeliveryType.PREPAID).get(0);
|
384 |
Long itemId = prod_client.getEntityLogisticsEstimation(entityId, DEFAULT_PINCODE, DeliveryType.PREPAID).get(0).getItemId();
|
| 387 |
logisticsInfo = prod_client.getLogisticsEstimation(itemId, DEFAULT_PINCODE, DeliveryType.PREPAID);
|
385 |
logisticsInfo = prod_client.getLogisticsEstimation(itemId, DEFAULT_PINCODE, DeliveryType.PREPAID);
|
| 388 |
accessoriesXMLSnippets.add(this.xmlIndentation[2] + "<ProductDeliveryEstimate>" + logisticsInfo.getDeliveryTime() + "</ProductDeliveryEstimate>");
|
386 |
accessoriesXMLSnippets.add(this.xmlIndentation[2] + "<ProductDeliveryEstimate>" + logisticsInfo.getDeliveryTime() + "</ProductDeliveryEstimate>");
|
| 389 |
} catch (Exception e1) {
|
387 |
} catch (Exception e1) {
|
| 390 |
Utils.info("Unable to get Estimation for Entity: " + entityId + "\n" + e1);
|
388 |
Utils.info("Unable to get Estimation for Entity: " + entityId + "\n" + e1);
|
| 391 |
}
|
389 |
}
|
| Line 448... |
Line 446... |
| 448 |
camerasXMLSnippets.add(this.xmlIndentation[2] + "<Availability>" + (inStockCatalogItemIds.contains(entityId) ? "Y" : "N") + "</Availability>");
|
446 |
camerasXMLSnippets.add(this.xmlIndentation[2] + "<Availability>" + (inStockCatalogItemIds.contains(entityId) ? "Y" : "N") + "</Availability>");
|
| 449 |
|
447 |
|
| 450 |
LogisticsInfo logisticsInfo = null;
|
448 |
LogisticsInfo logisticsInfo = null;
|
| 451 |
if(prod_client != null){
|
449 |
if(prod_client != null){
|
| 452 |
try {
|
450 |
try {
|
| 453 |
Long itemId = prod_client.getEntityLogisticsEstimation(entityId, DEFAULT_PINCODE, DeliveryType.PREPAID).get(0);
|
451 |
Long itemId = prod_client.getEntityLogisticsEstimation(entityId, DEFAULT_PINCODE, DeliveryType.PREPAID).get(0).getItemId();
|
| 454 |
logisticsInfo = prod_client.getLogisticsEstimation(itemId, DEFAULT_PINCODE, DeliveryType.PREPAID);
|
452 |
logisticsInfo = prod_client.getLogisticsEstimation(itemId, DEFAULT_PINCODE, DeliveryType.PREPAID);
|
| 455 |
camerasXMLSnippets.add(this.xmlIndentation[2] + "<ProductDeliveryEstimate>" + logisticsInfo.getDeliveryTime() + "</ProductDeliveryEstimate>");
|
453 |
camerasXMLSnippets.add(this.xmlIndentation[2] + "<ProductDeliveryEstimate>" + logisticsInfo.getDeliveryTime() + "</ProductDeliveryEstimate>");
|
| 456 |
} catch (Exception e1) {
|
454 |
} catch (Exception e1) {
|
| 457 |
Utils.info("Unable to get Estimation for Entity: " + entityId + "\n" + e1);
|
455 |
Utils.info("Unable to get Estimation for Entity: " + entityId + "\n" + e1);
|
| 458 |
}
|
456 |
}
|