| Line 13... |
Line 13... |
| 13 |
import java.util.Optional;
|
13 |
import java.util.Optional;
|
| 14 |
import java.util.Set;
|
14 |
import java.util.Set;
|
| 15 |
import java.util.stream.Collectors;
|
15 |
import java.util.stream.Collectors;
|
| 16 |
|
16 |
|
| 17 |
import javax.servlet.http.HttpServletRequest;
|
17 |
import javax.servlet.http.HttpServletRequest;
|
| - |
|
18 |
import javax.servlet.http.HttpServletResponse;
|
| 18 |
|
19 |
|
| 19 |
import org.apache.commons.lang3.StringUtils;
|
20 |
import org.apache.commons.lang3.StringUtils;
|
| 20 |
import org.apache.http.conn.HttpHostConnectException;
|
21 |
import org.apache.http.conn.HttpHostConnectException;
|
| 21 |
import org.apache.logging.log4j.LogManager;
|
22 |
import org.apache.logging.log4j.LogManager;
|
| 22 |
import org.apache.logging.log4j.Logger;
|
23 |
import org.apache.logging.log4j.Logger;
|
| Line 793... |
Line 794... |
| 793 |
return responseSender.ok(cust);
|
794 |
return responseSender.ok(cust);
|
| 794 |
}
|
795 |
}
|
| 795 |
|
796 |
|
| 796 |
@RequestMapping(value = "/stores/{state}/{city}/{storeCode}", method = RequestMethod.GET)
|
797 |
@RequestMapping(value = "/stores/{state}/{city}/{storeCode}", method = RequestMethod.GET)
|
| 797 |
@ResponseBody
|
798 |
@ResponseBody
|
| 798 |
public String getStoreIndex(HttpServletRequest request, @PathVariable String state, @PathVariable String city, @PathVariable String storeCode)
|
799 |
public void getStoreIndex(HttpServletResponse response, HttpServletRequest request, @PathVariable String state, @PathVariable String city, @PathVariable String storeCode)
|
| 799 |
throws Throwable {
|
800 |
throws Throwable {
|
| 800 |
logger.info("Store code {}", storeCode);
|
801 |
logger.info("Store code {}", storeCode);
|
| 801 |
storeCode = storeCode.toUpperCase();
|
802 |
storeCode = storeCode.toUpperCase();
|
| 802 |
Map<String,Integer> map = retailerService.getStoreCodeRetailerMap();
|
803 |
Map<String,Integer> map = retailerService.getStoreCodeRetailerMap();
|
| 803 |
logger.info("retailer id {}", map.get(storeCode));
|
804 |
logger.info("retailer id {}", map.get(storeCode));
|
| 804 |
String retailerName = retailerService.getAllFofoRetailerIdNameMap().get(map.get(storeCode));
|
805 |
String retailerName = retailerService.getAllFofoRetailerIdNameMap().get(map.get(storeCode));
|
| 805 |
String html = partnerIndexService.getPartnerIndexHtml();
|
806 |
String html = partnerIndexService.getPartnerIndexHtml();
|
| 806 |
logger.info("html {}", html);
|
807 |
logger.info("html {}", html);
|
| 807 |
html = html.replace("Buy Mobiles and Accessories at exciting prices - SmartDukaan",
|
808 |
html = html.replace("Buy Mobiles and Accessories at exciting prices - SmartDukaan",
|
| 808 |
String.format("%s is now ONLINE", retailerName));
|
809 |
String.format("%s is now ONLINE", retailerName));
|
| 809 |
return html;
|
810 |
response.getWriter().write(html);
|
| 810 |
}
|
811 |
}
|
| 811 |
|
812 |
|
| 812 |
@RequestMapping(value = "/cancelPendingOrderItem", method = RequestMethod.POST)
|
813 |
@RequestMapping(value = "/cancelPendingOrderItem", method = RequestMethod.POST)
|
| 813 |
public ResponseEntity<?> cancelPendingOrderItem(HttpServletRequest request, @RequestParam int id,
|
814 |
public ResponseEntity<?> cancelPendingOrderItem(HttpServletRequest request, @RequestParam int id,
|
| 814 |
|
815 |
|