| Line 421... |
Line 421... |
| 421 |
Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
|
421 |
Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
|
| 422 |
//Client catalogClientProd = new CatalogClient().getClient();
|
422 |
//Client catalogClientProd = new CatalogClient().getClient();
|
| 423 |
Long timestamp = System.currentTimeMillis();
|
423 |
Long timestamp = System.currentTimeMillis();
|
| 424 |
SnapdealItem snapdealItem = catalogClient.getSnapdealItem(Long.valueOf(itemId));
|
424 |
SnapdealItem snapdealItem = catalogClient.getSnapdealItem(Long.valueOf(itemId));
|
| 425 |
boolean toUpdate = false;
|
425 |
boolean toUpdate = false;
|
| - |
|
426 |
boolean toUpdateVoi = false;
|
| 426 |
if (snapdealItem.getSellingPrice()!=Double.valueOf(sellingPrice)
|
427 |
if (snapdealItem.getSellingPrice()!=Double.valueOf(sellingPrice)
|
| 427 |
|| snapdealItem.isIsListedOnSnapdeal()!=Boolean.valueOf(isListedOnSnapdeal)
|
428 |
|| snapdealItem.isIsListedOnSnapdeal()!=Boolean.valueOf(isListedOnSnapdeal)
|
| 428 |
|| snapdealItem.isSuppressPriceFeed()!=Boolean.valueOf(isSuppressPriceFeed)){
|
429 |
|| snapdealItem.isSuppressPriceFeed()!=Boolean.valueOf(isSuppressPriceFeed)){
|
| 429 |
toUpdate=true;
|
430 |
toUpdate=true;
|
| 430 |
}
|
431 |
}
|
| 431 |
if(sdVoiItemCode!=null && sdVoiItemCode.trim().length()>0){
|
432 |
if(sdVoiItemCode!=null && sdVoiItemCode.trim().length()>0){
|
| 432 |
if(snapdealItem.isIsVoiListed()!=Boolean.valueOf(isVoiListedOnSnapdeal)
|
433 |
if(snapdealItem.isIsVoiListed()!=Boolean.valueOf(isVoiListedOnSnapdeal)
|
| 433 |
|| snapdealItem.isSuppressVoiPriceFeed()!=Boolean.valueOf(isSuppressVoiPriceFeed)
|
434 |
|| snapdealItem.isSuppressVoiPriceFeed()!=Boolean.valueOf(isSuppressVoiPriceFeed)
|
| 434 |
|| snapdealItem.getVoiSellingPrice()!=Double.valueOf(voiSellingPrice)){
|
435 |
|| snapdealItem.getVoiSellingPrice()!=Double.valueOf(voiSellingPrice)){
|
| 435 |
toUpdate=true;
|
436 |
toUpdateVoi=true;
|
| 436 |
}
|
437 |
}
|
| 437 |
}
|
438 |
}
|
| 438 |
Item item = catalogClient.getItem(Long.valueOf(itemId));
|
439 |
Item item = catalogClient.getItem(Long.valueOf(itemId));
|
| 439 |
MarketplacePercentage mpCosting = catalogClient.getCostingForMarketplace(7, Long.valueOf(itemId));
|
440 |
MarketplacePercentage mpCosting = catalogClient.getCostingForMarketplace(7, Long.valueOf(itemId));
|
| 440 |
if (mpCosting.getSource()==0){
|
441 |
if (mpCosting.getSource()==0){
|
| Line 519... |
Line 520... |
| 519 |
logger.info("Calling Method to update price at snapdeal");
|
520 |
logger.info("Calling Method to update price at snapdeal");
|
| 520 |
UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,timestamp);
|
521 |
UpdateSDPricingUsingPanel updatePriceOnSnapdeal = new UpdateSDPricingUsingPanel(Float.valueOf(sellingPrice),supc,item,timestamp);
|
| 521 |
logger.info("Calling Thread to update price at snapdeal");
|
522 |
logger.info("Calling Thread to update price at snapdeal");
|
| 522 |
updatePriceOnSnapdeal.start();
|
523 |
updatePriceOnSnapdeal.start();
|
| 523 |
}
|
524 |
}
|
| 524 |
if(toUpdate && Boolean.valueOf(live) && (!snapdealItem.isSuppressVoiPriceFeed()) && snapdealItem.isIsVoiListed()){
|
525 |
if(toUpdateVoi && Boolean.valueOf(live) && (!snapdealItem.isSuppressVoiPriceFeed()) && snapdealItem.isIsVoiListed()){
|
| 525 |
logger.info("Calling Method to update price at snapdeal VOI");
|
526 |
logger.info("Calling Method to update price at snapdeal VOI");
|
| 526 |
UpdateSnapdealVoiPricingUsingPanel updatePriceOnSnapdealVoi = new UpdateSnapdealVoiPricingUsingPanel(Float.valueOf(voiSellingPrice),sdVoiItemCode,item,timestamp);
|
527 |
UpdateSnapdealVoiPricingUsingPanel updatePriceOnSnapdealVoi = new UpdateSnapdealVoiPricingUsingPanel(Float.valueOf(voiSellingPrice),sdVoiItemCode,item,timestamp);
|
| 527 |
logger.info("Calling Thread to update price at snapdeal VOI");
|
528 |
logger.info("Calling Thread to update price at snapdeal VOI");
|
| 528 |
updatePriceOnSnapdealVoi.start();
|
529 |
updatePriceOnSnapdealVoi.start();
|
| 529 |
}
|
530 |
}
|
| Line 879... |
Line 880... |
| 879 |
logger.info("Calling Thread to update new item price at snapdeal");
|
880 |
logger.info("Calling Thread to update new item price at snapdeal");
|
| 880 |
updatePriceOnSnapdeal.start();
|
881 |
updatePriceOnSnapdeal.start();
|
| 881 |
}
|
882 |
}
|
| 882 |
|
883 |
|
| 883 |
if(Boolean.valueOf(live) && (!snapdealItem.isSuppressVoiPriceFeed()) && snapdealItem.isIsVoiListed()){
|
884 |
if(Boolean.valueOf(live) && (!snapdealItem.isSuppressVoiPriceFeed()) && snapdealItem.isIsVoiListed()){
|
| 884 |
logger.info("Calling Method to update price at snapdeal");
|
885 |
logger.info("Calling Method to update price at snapdeal VOI");
|
| 885 |
UpdateSnapdealVoiPricingUsingPanel updatePriceOnSnapdealVoi = new UpdateSnapdealVoiPricingUsingPanel(Float.valueOf(voiSellingPrice),sdVoiItemCode,item,timestamp);
|
886 |
UpdateSnapdealVoiPricingUsingPanel updatePriceOnSnapdealVoi = new UpdateSnapdealVoiPricingUsingPanel(Float.valueOf(voiSellingPrice),sdVoiItemCode,item,timestamp);
|
| 886 |
logger.info("Calling Thread to update price at snapdeal");
|
887 |
logger.info("Calling Thread to update price at snapdeal VOI");
|
| 887 |
updatePriceOnSnapdealVoi.start();
|
888 |
updatePriceOnSnapdealVoi.start();
|
| 888 |
}
|
889 |
}
|
| 889 |
|
890 |
|
| 890 |
return "snapdeal-update-result";
|
891 |
return "snapdeal-update-result";
|
| 891 |
}
|
892 |
}
|