| Line 73... |
Line 73... |
| 73 |
import org.apache.logging.log4j.Logger;
|
73 |
import org.apache.logging.log4j.Logger;
|
| 74 |
import org.json.JSONArray;
|
74 |
import org.json.JSONArray;
|
| 75 |
import org.json.JSONObject;
|
75 |
import org.json.JSONObject;
|
| 76 |
import org.springframework.beans.factory.annotation.Autowired;
|
76 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 77 |
import org.springframework.beans.factory.annotation.Value;
|
77 |
import org.springframework.beans.factory.annotation.Value;
|
| - |
|
78 |
import org.springframework.cache.annotation.Cacheable;
|
| 78 |
import org.springframework.core.io.InputStreamResource;
|
79 |
import org.springframework.core.io.InputStreamResource;
|
| 79 |
import org.springframework.http.HttpHeaders;
|
80 |
import org.springframework.http.HttpHeaders;
|
| 80 |
import org.springframework.http.HttpStatus;
|
81 |
import org.springframework.http.HttpStatus;
|
| 81 |
import org.springframework.http.MediaType;
|
82 |
import org.springframework.http.MediaType;
|
| 82 |
import org.springframework.http.ResponseEntity;
|
83 |
import org.springframework.http.ResponseEntity;
|
| Line 855... |
Line 856... |
| 855 |
*/
|
856 |
*/
|
| 856 |
|
857 |
|
| 857 |
}
|
858 |
}
|
| 858 |
|
859 |
|
| 859 |
@RequestMapping(value = "/store/listing", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
860 |
@RequestMapping(value = "/store/listing", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| - |
|
861 |
@Cacheable(value = "storesListing", cacheManager = "thirtyMinsTimeOutCacheManager")
|
| 860 |
public ResponseEntity<?> getStoresListing(HttpServletRequest request) throws Exception {
|
862 |
public ResponseEntity<?> getStoresListing(HttpServletRequest request) throws Exception {
|
| 861 |
List<WebListing> webListings = webListingRepository.selectAllWebListingByType(Optional.of(true), WebListingSource.store);
|
863 |
List<WebListing> webListings = webListingRepository.selectAllWebListingByType(Optional.of(true), WebListingSource.store);
|
| 862 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
864 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
| 863 |
for (WebListing webListing : webListings) {
|
865 |
for (WebListing webListing : webListings) {
|
| 864 |
webListing.setFofoCatalogResponses(getDealResponses(userInfo, webListing));
|
866 |
webListing.setFofoCatalogResponses(getDealResponses(userInfo, webListing));
|