Subversion Repositories SmartDukaan

Rev

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

Rev 28316 Rev 28321
Line 110... Line 110...
110
 
110
 
111
	private static final LocalTime CUTOFF_TIME = LocalTime.of(15, 0);
111
	private static final LocalTime CUTOFF_TIME = LocalTime.of(15, 0);
112
 
112
 
113
	private static final List<Integer> TAG_IDS = Arrays.asList(4);
113
	private static final List<Integer> TAG_IDS = Arrays.asList(4);
114
 
114
 
115
	private static final int DEFAULT_STORE = 171912487;
-
 
116
 
-
 
117
	@Autowired
115
	@Autowired
118
	CustomerAddressRepository customerAddressRepository;
116
	CustomerAddressRepository customerAddressRepository;
119
 
117
 
120
	@Value("${new.solr.url}")
118
	@Value("${new.solr.url}")
121
	private String solrUrl;
119
	private String solrUrl;
Line 370... Line 368...
370
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
368
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
371
	@ApiOperation(value = "Get brand list and count for category")
369
	@ApiOperation(value = "Get brand list and count for category")
372
	public ResponseEntity<?> getStoresByPincode(HttpServletRequest request, @PathVariable String pincode)
370
	public ResponseEntity<?> getStoresByPincode(HttpServletRequest request, @PathVariable String pincode)
373
			throws Exception {
371
			throws Exception {
374
		List<PincodePartner> pincodePartners = pincodePartnerRepository.selectPartnersByPincode(pincode);
372
		List<PincodePartner> pincodePartners = pincodePartnerRepository.selectPartnersByPincode(pincode);
375
		int fofoId = DEFAULT_STORE;
373
		int fofoId = ProfitMandiConstants.DEFAULT_STORE;
376
		if (pincodePartners.size() > 0) {
374
		if (pincodePartners.size() > 0) {
377
			List<Integer> fofoIds = pincodePartners.stream().map(x -> x.getFofoId()).collect(Collectors.toList());
375
			List<Integer> fofoIds = pincodePartners.stream().map(x -> x.getFofoId()).collect(Collectors.toList());
378
			List<FofoStore> fofoStores = fofoStoreRepository.selectActivePartnersByRetailerIds(fofoIds);
376
			List<FofoStore> fofoStores = fofoStoreRepository.selectActivePartnersByRetailerIds(fofoIds);
379
			if (fofoStores.size() > 0) {
377
			if (fofoStores.size() > 0) {
380
				fofoId = fofoStores.get(0).getId();
378
				fofoId = fofoStores.get(0).getId();