| Line 17... |
Line 17... |
| 17 |
import in.shop2020.model.v1.inventory.WarehouseType;
|
17 |
import in.shop2020.model.v1.inventory.WarehouseType;
|
| 18 |
import in.shop2020.model.v1.order.OrderSource;
|
18 |
import in.shop2020.model.v1.order.OrderSource;
|
| 19 |
import in.shop2020.model.v1.order.SnapdealOrder;
|
19 |
import in.shop2020.model.v1.order.SnapdealOrder;
|
| 20 |
import in.shop2020.support.utils.ReportsUtils;
|
20 |
import in.shop2020.support.utils.ReportsUtils;
|
| 21 |
import in.shop2020.support.utils.UpdateSDPricingUsingPanel;
|
21 |
import in.shop2020.support.utils.UpdateSDPricingUsingPanel;
|
| - |
|
22 |
import in.shop2020.support.utils.UpdateSnapdealVoiPricingUsingPanel;
|
| 22 |
import in.shop2020.thrift.clients.CatalogClient;
|
23 |
import in.shop2020.thrift.clients.CatalogClient;
|
| 23 |
import in.shop2020.thrift.clients.InventoryClient;
|
24 |
import in.shop2020.thrift.clients.InventoryClient;
|
| 24 |
import in.shop2020.thrift.clients.TransactionClient;
|
25 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 25 |
import in.shop2020.thrift.clients.config.ConfigClient;
|
26 |
import in.shop2020.thrift.clients.config.ConfigClient;
|
| 26 |
import in.shop2020.utils.GmailUtils;
|
27 |
import in.shop2020.utils.GmailUtils;
|
| Line 514... |
Line 515... |
| 514 |
sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
|
515 |
sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
|
| 515 |
}
|
516 |
}
|
| 516 |
logger.info("\nUpdate Method Item Id "+itemId+"\nSelling Price "+sellingPrice+"\nWarehouse Id "+warehouseId+"\nMax Nlc "+maxNlc+"\nUpdated By: "+session.getAttribute(ReportsUtils.USER_NAME).toString());
|
517 |
logger.info("\nUpdate Method Item Id "+itemId+"\nSelling Price "+sellingPrice+"\nWarehouse Id "+warehouseId+"\nMax Nlc "+maxNlc+"\nUpdated By: "+session.getAttribute(ReportsUtils.USER_NAME).toString());
|
| 517 |
if(toUpdate && Boolean.valueOf(live) && (!snapdealItem.isSuppressPriceFeed()) && snapdealItem.isIsListedOnSnapdeal()){
|
518 |
if(toUpdate && Boolean.valueOf(live) && (!snapdealItem.isSuppressPriceFeed()) && snapdealItem.isIsListedOnSnapdeal()){
|
| 518 |
logger.info("Calling Method to update price at snapdeal");
|
519 |
logger.info("Calling Method to update price at snapdeal");
|
| 519 |
UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,timestamp,false);
|
520 |
UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,timestamp);
|
| 520 |
logger.info("Calling Thread to update price at snapdeal");
|
521 |
logger.info("Calling Thread to update price at snapdeal");
|
| 521 |
updatePriceOnSnapdeal.start();
|
522 |
updatePriceOnSnapdeal.start();
|
| 522 |
}
|
523 |
}
|
| 523 |
if(toUpdate && Boolean.valueOf(live) && (!snapdealItem.isSuppressVoiPriceFeed()) && snapdealItem.isIsVoiListed()){
|
524 |
if(toUpdate && Boolean.valueOf(live) && (!snapdealItem.isSuppressVoiPriceFeed()) && snapdealItem.isIsVoiListed()){
|
| 524 |
logger.info("Calling Method to update price at snapdeal");
|
525 |
logger.info("Calling Method to update price at snapdeal");
|
| 525 |
UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(voiSellingPrice),supc,item,timestamp,true);
|
526 |
UpdateSnapdealVoiPricingUsingPanel updatePriceOnSnapdealVoi = new UpdateSnapdealVoiPricingUsingPanel(Float.valueOf(voiSellingPrice),supc,item,timestamp);
|
| 526 |
logger.info("Calling Thread to update price at snapdeal");
|
527 |
logger.info("Calling Thread to update price at snapdeal");
|
| 527 |
updatePriceOnSnapdeal.start();
|
528 |
updatePriceOnSnapdealVoi.start();
|
| 528 |
}
|
529 |
}
|
| 529 |
return "snapdeal-update-result";
|
530 |
return "snapdeal-update-result";
|
| 530 |
}
|
531 |
}
|
| 531 |
|
532 |
|
| 532 |
|
533 |
|
| 533 |
public void updateForAutoPricing() throws NumberFormatException, CatalogServiceException, TException{
|
534 |
public void updateForAutoPricing() throws NumberFormatException, CatalogServiceException, TException{
|
| 534 |
logger.info("Calling Method to update price at snapdeal for auto pricing");
|
535 |
logger.info("Calling Method to update price at snapdeal for auto pricing");
|
| 535 |
Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
|
536 |
Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
|
| 536 |
Item item = catalogClient.getItem(Long.valueOf(itemId));
|
537 |
Item item = catalogClient.getItem(Long.valueOf(itemId));
|
| 537 |
UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,System.currentTimeMillis(),false);
|
538 |
UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,System.currentTimeMillis());
|
| 538 |
logger.info("Calling Thread to update price at snapdeal for auto pricing");
|
539 |
logger.info("Calling Thread to update price at snapdeal for auto pricing");
|
| 539 |
updatePriceOnSnapdeal.start();
|
540 |
updatePriceOnSnapdeal.start();
|
| 540 |
}
|
541 |
}
|
| 541 |
|
542 |
|
| 542 |
|
543 |
|
| Line 872... |
Line 873... |
| 872 |
sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
|
873 |
sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
|
| 873 |
}
|
874 |
}
|
| 874 |
|
875 |
|
| 875 |
if (Boolean.valueOf(live) && (!snapdealItem.isSuppressPriceFeed()) && snapdealItem.isIsListedOnSnapdeal()){
|
876 |
if (Boolean.valueOf(live) && (!snapdealItem.isSuppressPriceFeed()) && snapdealItem.isIsListedOnSnapdeal()){
|
| 876 |
logger.info("Calling Method to update new item price at snapdeal");
|
877 |
logger.info("Calling Method to update new item price at snapdeal");
|
| 877 |
UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,timestamp,false);
|
878 |
UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,timestamp);
|
| 878 |
logger.info("Calling Thread to update new item price at snapdeal");
|
879 |
logger.info("Calling Thread to update new item price at snapdeal");
|
| 879 |
updatePriceOnSnapdeal.start();
|
880 |
updatePriceOnSnapdeal.start();
|
| 880 |
}
|
881 |
}
|
| 881 |
|
882 |
|
| 882 |
if(Boolean.valueOf(live) && (!snapdealItem.isSuppressVoiPriceFeed()) && snapdealItem.isIsVoiListed()){
|
883 |
if(Boolean.valueOf(live) && (!snapdealItem.isSuppressVoiPriceFeed()) && snapdealItem.isIsVoiListed()){
|
| 883 |
logger.info("Calling Method to update price at snapdeal");
|
884 |
logger.info("Calling Method to update price at snapdeal");
|
| 884 |
UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(voiSellingPrice),supc,item,timestamp,true);
|
885 |
UpdateSnapdealVoiPricingUsingPanel updatePriceOnSnapdealVoi = new UpdateSnapdealVoiPricingUsingPanel(Float.valueOf(voiSellingPrice),supc,item,timestamp);
|
| 885 |
logger.info("Calling Thread to update price at snapdeal");
|
886 |
logger.info("Calling Thread to update price at snapdeal");
|
| 886 |
updatePriceOnSnapdeal.start();
|
887 |
updatePriceOnSnapdealVoi.start();
|
| 887 |
}
|
888 |
}
|
| 888 |
|
889 |
|
| 889 |
return "snapdeal-update-result";
|
890 |
return "snapdeal-update-result";
|
| 890 |
}
|
891 |
}
|
| 891 |
|
892 |
|