| Line 1... |
Line 1... |
| 1 |
package in.shop2020;
|
1 |
package in.shop2020;
|
| 2 |
|
2 |
|
| - |
|
3 |
import in.shop2020.model.v1.catalog.CatalogServiceException;
|
| 3 |
import in.shop2020.model.v1.catalog.FlipkartItem;
|
4 |
import in.shop2020.model.v1.catalog.FlipkartItem;
|
| 4 |
import in.shop2020.model.v1.catalog.Item;
|
5 |
import in.shop2020.model.v1.catalog.Item;
|
| 5 |
import in.shop2020.model.v1.catalog.SnapdealItem;
|
6 |
import in.shop2020.model.v1.catalog.SnapdealItem;
|
| 6 |
import in.shop2020.model.v1.inventory.FlipkartInventorySnapshot;
|
7 |
import in.shop2020.model.v1.inventory.FlipkartInventorySnapshot;
|
| 7 |
import in.shop2020.model.v1.inventory.InventoryService.Client;
|
8 |
import in.shop2020.model.v1.inventory.InventoryService.Client;
|
| Line 46... |
Line 47... |
| 46 |
|
47 |
|
| 47 |
|
48 |
|
| 48 |
public class FlipkartInventoryReconcillation {
|
49 |
public class FlipkartInventoryReconcillation {
|
| 49 |
|
50 |
|
| 50 |
|
51 |
|
| 51 |
public static void main(String... args) throws ClientProtocolException, IOException, TException{
|
52 |
public static void main(String... args) throws ClientProtocolException, IOException, TException, CatalogServiceException{
|
| 52 |
SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
53 |
SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
| 53 |
String emailFromAddress = "build@shop2020.in";
|
54 |
String emailFromAddress = "build@shop2020.in";
|
| 54 |
String password = "cafe@nes";
|
55 |
String password = "cafe@nes";
|
| 55 |
GmailUtils mailer = new GmailUtils();
|
56 |
GmailUtils mailer = new GmailUtils();
|
| 56 |
String[] sendTo = new String[]{"vikram.raghav@shop2020.in"};
|
57 |
String[] sendTo = new String[]{"vikram.raghav@shop2020.in"};
|
| Line 58... |
Line 59... |
| 58 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
59 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
| 59 |
"yukti.jain@shop2020.in","manoj.pal@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in","amar.kumar@shop2020.in"};
|
60 |
"yukti.jain@shop2020.in","manoj.pal@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in","amar.kumar@shop2020.in"};
|
| 60 |
*/
|
61 |
*/
|
| 61 |
Map<String,Long> itemInventoryMap = FetchInventoryAtFlipkart();
|
62 |
Map<String,Long> itemInventoryMap = FetchInventoryAtFlipkart();
|
| 62 |
in.shop2020.model.v1.catalog.CatalogService.Client catalogClient = new CatalogClient().getClient();
|
63 |
in.shop2020.model.v1.catalog.CatalogService.Client catalogClient = new CatalogClient().getClient();
|
| 63 |
List<Item> aliveItems = catalogClient.getAllAliveItems();
|
64 |
List<Item> aliveItems = catalogClient.getAllItems(true);
|
| 64 |
List<FlipkartItem> flipkartItems;
|
65 |
List<FlipkartItem> flipkartItems;
|
| 65 |
try{
|
66 |
try{
|
| 66 |
flipkartItems = catalogClient.getAllFlipkartItems();
|
67 |
flipkartItems = catalogClient.getAllFlipkartItems();
|
| 67 |
}
|
68 |
}
|
| 68 |
catch(Exception ex){
|
69 |
catch(Exception ex){
|