| Line 406... |
Line 406... |
| 406 |
@RequestMapping(value = "/fofo/brands", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
406 |
@RequestMapping(value = "/fofo/brands", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 407 |
public ResponseEntity<?> getBrandsToDisplay(HttpServletRequest request,
|
407 |
public ResponseEntity<?> getBrandsToDisplay(HttpServletRequest request,
|
| 408 |
@RequestParam(required = false, defaultValue = "0") int categoryId) throws Exception {
|
408 |
@RequestParam(required = false, defaultValue = "0") int categoryId) throws Exception {
|
| 409 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
409 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
| 410 |
logger.info("userInfo [{}]", userInfo);
|
410 |
logger.info("userInfo [{}]", userInfo);
|
| 411 |
List<DBObject> brandsDisplay = null;
|
- |
|
| 412 |
if (categoryId == 3) {
|
- |
|
| 413 |
brandsDisplay = mongoClient.getMongoBrands(userInfo.getRetailerId(), userInfo.getEmail(), categoryId);
|
411 |
List<DBObject> brandsDisplay = mongoClient.getMongoBrands(userInfo.getRetailerId(), userInfo.getEmail(), categoryId);
|
| 414 |
} else {
|
- |
|
| 415 |
brandsDisplay = this.getSubCategoriesToDisplay();
|
- |
|
| 416 |
}
|
- |
|
| 417 |
return new ResponseEntity<>(brandsDisplay, HttpStatus.OK);
|
412 |
return new ResponseEntity<>(brandsDisplay, HttpStatus.OK);
|
| 418 |
}
|
413 |
}
|
| 419 |
@RequestMapping(value = "/fofo/accessory/all-categories", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
414 |
@RequestMapping(value = "/fofo/accessory/all-categories", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 420 |
public ResponseEntity<?> getSubCategoriesToDisplay(HttpServletRequest request) throws Exception {
|
415 |
public ResponseEntity<?> getSubCategoriesToDisplay(HttpServletRequest request) throws Exception {
|
| 421 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
416 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|