Subversion Repositories SmartDukaan

Rev

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

Rev 26716 Rev 26717
Line 84... Line 84...
84
 
84
 
85
	private static final Logger logger = LogManager.getLogger(StoreController.class);
85
	private static final Logger logger = LogManager.getLogger(StoreController.class);
86
 
86
 
87
	private static final LocalTime CUTOFF_TIME = LocalTime.of(15, 0);
87
	private static final LocalTime CUTOFF_TIME = LocalTime.of(15, 0);
88
	
88
	
89
	private static final int DEFAULT_STORE = 0;
89
	private static final int DEFAULT_STORE = 171912487;
90
 
90
 
91
	@Value("${python.api.host}")
91
	@Value("${python.api.host}")
92
	private String host;
92
	private String host;
93
 
93
 
94
	@Value("${python.api.port}")
94
	@Value("${python.api.port}")
Line 377... Line 377...
377
	public ResponseEntity<?> getStoresByPincode(HttpServletRequest request, @PathVariable String pincode) throws Exception {
377
	public ResponseEntity<?> getStoresByPincode(HttpServletRequest request, @PathVariable String pincode) throws Exception {
378
		List<PincodePartner> pincodePartners = pincodePartnerRepository.selectPartnersByPincode(pincode);
378
		List<PincodePartner> pincodePartners = pincodePartnerRepository.selectPartnersByPincode(pincode);
379
		int fofoId = DEFAULT_STORE;
379
		int fofoId = DEFAULT_STORE;
380
		if(pincodePartners.size()>0) {
380
		if(pincodePartners.size()>0) {
381
			fofoId = pincodePartners.get(0).getFofoId();
381
			fofoId = pincodePartners.get(0).getFofoId();
382
			return responseSender.ok(retailerService.getAllFofoRetailerIdUrlMap().get(fofoId));
-
 
383
		}
382
		}
384
		return responseSender.ok(retailerService.getFofoRetailer(fofoId));
383
		return responseSender.ok(retailerService.getAllFofoRetailerIdUrlMap().get(fofoId));
385
	}
384
	}
386
 
385
 
387
	@RequestMapping(value = "/store/cart", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
386
	@RequestMapping(value = "/store/cart", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
388
	@ApiImplicitParams({
387
	@ApiImplicitParams({
389
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
388
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })