Subversion Repositories SmartDukaan

Rev

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

Rev 22406 Rev 22407
Line 371... Line 371...
371
		StringBuffer sb = new StringBuffer("/getDealsForNotification/");
371
		StringBuffer sb = new StringBuffer("/getDealsForNotification/");
372
		String uri = sb.append(skus).toString();
372
		String uri = sb.append(skus).toString();
373
		RestClient rc = new RestClient(SchemeType.HTTP, host, port);
373
		RestClient rc = new RestClient(SchemeType.HTTP, host, port);
374
		String response = rc.get(uri, new HashMap<>());
374
		String response = rc.get(uri, new HashMap<>());
375
		JsonArray result_json = Json.parse(response).asArray();
375
		JsonArray result_json = Json.parse(response).asArray();
-
 
376
		List<Object> responseObject = new ArrayList<>();
-
 
377
		for (JsonValue j : result_json) {
-
 
378
			logger.info("res " + j.asArray());
-
 
379
			List<Object> innerObject = new ArrayList<>();
-
 
380
			for (JsonValue jsonObject : j.asArray()) {
-
 
381
				innerObject.add(toDealObject(jsonObject.asObject()));
-
 
382
			}
-
 
383
			if (innerObject.size() > 0) {
-
 
384
				responseObject.add(innerObject);
-
 
385
			}
-
 
386
		}
376
		return new ResponseEntity<>(result_json, HttpStatus.OK);
387
		return new ResponseEntity<>(responseObject, HttpStatus.OK);
377
	}
388
	}
378
 
389
 
379
}
390
}