...
|
...
|
@@ -25,6 +25,7 @@ import com.yoho.search.core.es.model.SearchParam; |
|
|
import com.yoho.search.core.es.model.SearchResult;
|
|
|
import com.yoho.search.service.aggregations.impls.AggregationFactoryService;
|
|
|
import com.yoho.search.service.cache.SearchCacheFactory;
|
|
|
import com.yoho.search.service.cache.SearchCacheMatchLogger;
|
|
|
import com.yoho.search.service.cache.model.SearchCache;
|
|
|
import com.yoho.search.service.service.SearchCacheService;
|
|
|
import com.yoho.search.service.service.SearchCommonService;
|
...
|
...
|
@@ -37,7 +38,6 @@ import com.yoho.search.service.servicenew.IPromotionService; |
|
|
import com.yoho.search.service.servicenew.ISearchSortGroupService;
|
|
|
import com.yoho.search.service.servicenew.ISelectionsForApp;
|
|
|
import com.yoho.search.service.servicenew.ISelectionsForPc;
|
|
|
import com.yoho.search.service.utils.HttpServletRequestUtils;
|
|
|
import com.yoho.search.service.vo.PromotionConditions;
|
|
|
import com.yoho.search.service.vo.PromotionParam;
|
|
|
import com.yoho.search.service.vo.SearchApiResult;
|
...
|
...
|
@@ -45,8 +45,6 @@ import com.yoho.search.service.vo.SearchApiResult; |
|
|
@Service
|
|
|
public class PromotionServiceImpl implements IPromotionService {
|
|
|
|
|
|
private static Logger CACHE_MATCH_REQUEST = LoggerFactory.getLogger("CACHE_MATCH_REQUEST");
|
|
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(PromotionServiceImpl.class);
|
|
|
|
|
|
@Autowired
|
...
|
...
|
@@ -237,7 +235,7 @@ public class PromotionServiceImpl implements IPromotionService { |
|
|
final String productIndexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
|
|
|
JSONObject cacheObject = searchCacheService.getJSONObjectFromCache(productListSearchCache, productIndexName, searchParam);
|
|
|
if (cacheObject != null) {
|
|
|
CACHE_MATCH_REQUEST.info("match cache , url is :/promotion/list.json?" + HttpServletRequestUtils.genParamString(paramMap));
|
|
|
SearchCacheMatchLogger.doSearchCacheMatchLog("/promotion/list.json", paramMap);
|
|
|
return new SearchApiResult().setData(cacheObject);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -289,7 +287,7 @@ public class PromotionServiceImpl implements IPromotionService { |
|
|
if (cacheObject != null) {
|
|
|
Object newCacheObject = searchAfterCacheService.dealFilterCacheObject(cacheObject);
|
|
|
newCacheObject = searchAfterCacheService.dealDiscountCacheObject((JSONObject) newCacheObject);
|
|
|
CACHE_MATCH_REQUEST.info("match cache , url is :/promotion/selections.json?" + HttpServletRequestUtils.genParamString(paramMap));
|
|
|
SearchCacheMatchLogger.doSearchCacheMatchLog("/promotion/selections.json", paramMap);
|
|
|
return new SearchApiResult().setData(newCacheObject);
|
|
|
}
|
|
|
|
...
|
...
|
|