Subversion Repositories SmartDukaan

Rev

Rev 36591 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36591 Rev 37115
Line 643... Line 643...
643
            dealResponse = getCatalogResponse(docs, false, userInfo.getRetailerId());
643
            dealResponse = getCatalogResponse(docs, false, userInfo.getRetailerId());
644
        } else {
644
        } else {
645
            return responseSender.badRequest(
645
            return responseSender.badRequest(
646
                    new ProfitMandiBusinessException("Retailer id", userInfo.getUserId(), "NOT_FOFO_RETAILER"));
646
                    new ProfitMandiBusinessException("Retailer id", userInfo.getUserId(), "NOT_FOFO_RETAILER"));
647
        }
647
        }
-
 
648
        if (dealResponse.isEmpty()) {
-
 
649
            return responseSender.badRequest(
-
 
650
                    new ProfitMandiBusinessException("catalogId", id, "DEAL_NOT_FOUND"));
-
 
651
        }
648
        return responseSender.ok(dealResponse.get(0));
652
        return responseSender.ok(dealResponse.get(0));
649
    }
653
    }
650
 
654
 
651
 
655
 
652
    @RequestMapping(value = "/suggestedPoDeals", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
656
    @RequestMapping(value = "/suggestedPoDeals", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)