Subversion Repositories SmartDukaan

Rev

Rev 10408 | Rev 10450 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10408 Rev 10422
Line 73... Line 73...
73
	static java.text.SimpleDateFormat sdf;
73
	static java.text.SimpleDateFormat sdf;
74
	static String emailFromAddress;
74
	static String emailFromAddress;
75
	static String password;
75
	static String password;
76
	static GmailUtils mailer;
76
	static GmailUtils mailer;
77
	static String sendTo[];
77
	static String sendTo[];
78
	static StringBuffer notMappedItems =new StringBuffer();
78
	static StringBuffer notMappedItems=null;
79
 
79
 
80
	public static void initilaize() {
80
	public static void initilaize() {
81
		sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
81
		sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
82
		emailFromAddress = "build@shop2020.in";
82
		emailFromAddress = "build@shop2020.in";
83
		password = "cafe@nes";
83
		password = "cafe@nes";
Line 466... Line 466...
466
		currentInventoryItemList = new ArrayList<Inventory>();
466
		currentInventoryItemList = new ArrayList<Inventory>();
467
		HttpGet get;
467
		HttpGet get;
468
		HttpResponse response = null;
468
		HttpResponse response = null;
469
		BufferedReader rd= null;
469
		BufferedReader rd= null;
470
		System.out.println("Fetching current inventory ");
470
		System.out.println("Fetching current inventory ");
-
 
471
		notMappedItems = new StringBuffer();
471
		while(true){
472
		while(true){
472
			//System.out.println("Fetching current inventory page " +i);
473
			//System.out.println("Fetching current inventory page " +i);
473
			get = new HttpGet("http://seller.snapdeal.com/inventory/search?gridType=normal&_search=false&nd="+time+"&rows="+30+"&page="+i+"&sidx=&sord=asc");
474
			get = new HttpGet("http://seller.snapdeal.com/inventory/search?gridType=normal&_search=false&nd="+time+"&rows="+30+"&page="+i+"&sidx=&sord=asc");
474
			try {
475
			try {
475
				response = client.execute(get);
476
				response = client.execute(get);
Line 533... Line 534...
533
			catalogServiceClient = new CatalogClient().getClient();
534
			catalogServiceClient = new CatalogClient().getClient();
534
		} catch (TTransportException e1) {
535
		} catch (TTransportException e1) {
535
 
536
 
536
			e1.printStackTrace();
537
			e1.printStackTrace();
537
		}
538
		}
538
		List<String> notMappedItems = new ArrayList<String>();
-
 
539
 
-
 
540
		for(Inventory inventory:currentInventoryItemList){
539
		for(Inventory inventory:currentInventoryItemList){
541
			created_orders = 0;
540
			created_orders = 0;
542
			pending_orders = 0;
541
			pending_orders = 0;
543
			snapdealitem = snapdealItemMap.get(inventory.getSellerSku());
542
			snapdealitem = snapdealItemMap.get(inventory.getSellerSku());
544
			if(snapdealitem==null){
543
			if(snapdealitem==null){
545
				notMappedItems.add(inventory.getSellerSku()+" "+inventory.getProductName());
-
 
546
				System.out.println("Not Mapped  " + inventory.getSellerSku());
544
				System.out.println("Not Mapped  " + inventory.getSellerSku());
547
				continue;
545
				continue;
548
			}
546
			}
549
			sku = snapdealitem.getItem_id();
547
			sku = snapdealitem.getItem_id();
550
			if(sku!=0){
548
			if(sku!=0){