| Line 62... |
Line 62... |
| 62 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
62 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
| 63 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
63 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
| 64 |
import com.spice.profitmandi.dao.entity.dtr.WebListing;
|
64 |
import com.spice.profitmandi.dao.entity.dtr.WebListing;
|
| 65 |
import com.spice.profitmandi.dao.entity.fofo.Customer;
|
65 |
import com.spice.profitmandi.dao.entity.fofo.Customer;
|
| 66 |
import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;
|
66 |
import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;
|
| - |
|
67 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
| 67 |
import com.spice.profitmandi.dao.entity.fofo.PendingOrder;
|
68 |
import com.spice.profitmandi.dao.entity.fofo.PendingOrder;
|
| 68 |
import com.spice.profitmandi.dao.entity.fofo.PendingOrderItem;
|
69 |
import com.spice.profitmandi.dao.entity.fofo.PendingOrderItem;
|
| 69 |
import com.spice.profitmandi.dao.entity.fofo.PincodePartner;
|
70 |
import com.spice.profitmandi.dao.entity.fofo.PincodePartner;
|
| 70 |
import com.spice.profitmandi.dao.enumuration.dtr.OtpType;
|
71 |
import com.spice.profitmandi.dao.enumuration.dtr.OtpType;
|
| 71 |
import com.spice.profitmandi.dao.enumuration.transaction.OrderStatus;
|
72 |
import com.spice.profitmandi.dao.enumuration.transaction.OrderStatus;
|
| Line 490... |
Line 491... |
| 490 |
public ResponseEntity<?> getStoresByPincode(HttpServletRequest request, @PathVariable String pincode)
|
491 |
public ResponseEntity<?> getStoresByPincode(HttpServletRequest request, @PathVariable String pincode)
|
| 491 |
throws Exception {
|
492 |
throws Exception {
|
| 492 |
List<PincodePartner> pincodePartners = pincodePartnerRepository.selectPartnersByPincode(pincode);
|
493 |
List<PincodePartner> pincodePartners = pincodePartnerRepository.selectPartnersByPincode(pincode);
|
| 493 |
int fofoId = DEFAULT_STORE;
|
494 |
int fofoId = DEFAULT_STORE;
|
| 494 |
if (pincodePartners.size() > 0) {
|
495 |
if (pincodePartners.size() > 0) {
|
| - |
|
496 |
List<Integer> fofoIds = pincodePartners.stream().map(x->x.getFofoId()).collect(Collectors.toList());
|
| - |
|
497 |
List<FofoStore> fofoStores = fofoStoreRepository.selectActivePartnersByRetailerIds(fofoIds);
|
| - |
|
498 |
if(fofoStores.size() > 0) {
|
| 495 |
fofoId = pincodePartners.get(0).getFofoId();
|
499 |
fofoId = fofoStores.get(0).getId();
|
| - |
|
500 |
}
|
| - |
|
501 |
|
| 496 |
}
|
502 |
}
|
| 497 |
return responseSender.ok(fofoStoreRepository.selectByRetailerId(fofoId).getCode());
|
503 |
return responseSender.ok(fofoStoreRepository.selectByRetailerId(fofoId).getCode());
|
| 498 |
}
|
504 |
}
|
| 499 |
|
505 |
|
| 500 |
@RequestMapping(value = "/store/order", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
506 |
@RequestMapping(value = "/store/order", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|