Subversion Repositories SmartDukaan

Rev

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

Rev 10894 Rev 10895
Line 124... Line 124...
124
		long sku;
124
		long sku;
125
		String subOrderId;
125
		String subOrderId;
126
		for(Order order:orders.getOrder()){
126
		for(Order order:orders.getOrder()){
127
			subOrderId = order.getSuborderId();
127
			subOrderId = order.getSuborderId();
128
			Client transaction_client = null;
128
			Client transaction_client = null;
-
 
129
			new_orders++;
129
			try {
130
			try {
130
				transaction_client = new TransactionClient().getClient();
131
				transaction_client = new TransactionClient().getClient();
131
				if(transaction_client.snapdealOrderExists(subOrderId, order.getReferenceCode())) {
132
				if(transaction_client.snapdealOrderExists(subOrderId, order.getReferenceCode())) {
132
					logger.error("Snapdeal suborder id exists " + subOrderId);
133
					logger.error("Snapdeal suborder id exists " + subOrderId);
133
					duplicate_orders++;
134
					duplicate_orders++;
Line 135... Line 136...
135
				}
136
				}
136
 
137
 
137
			} catch (TTransportException e1) {
138
			} catch (TTransportException e1) {
138
				logger.error("Problem with Transaction service " , e1);
139
				logger.error("Problem with Transaction service " , e1);
139
				e1.printStackTrace();
140
				e1.printStackTrace();
-
 
141
				continue;
140
			} catch (TException e) {
142
			} catch (TException e) {
141
				logger.error("Problem.. thrift exception with Transaction service " , e);
143
				logger.error("Problem.. thrift exception with Transaction service " , e);
142
				e.printStackTrace();
144
				e.printStackTrace();
-
 
145
				continue;
143
			}
146
			}
144
			new_orders++;
-
 
145
			Transaction txn = new Transaction();
147
			Transaction txn = new Transaction();
146
			txn.setShoppingCartid(user.getActiveCartId());
148
			txn.setShoppingCartid(user.getActiveCartId());
147
			txn.setCustomer_id(user.getUserId());
149
			txn.setCustomer_id(user.getUserId());
148
			System.out.println("User Id is " + user.getUserId());
150
			System.out.println("User Id is " + user.getUserId());
149
			txn.setCreatedOn(new Date().getTime());
151
			txn.setCreatedOn(new Date().getTime());