...
|
...
|
@@ -18,6 +18,7 @@ import org.slf4j.LoggerFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import com.yoho.search.base.utils.CollectionUtils;
|
|
|
import com.yoho.search.base.utils.ISearchConstants;
|
|
|
import com.yoho.search.base.utils.ProductIndexEsField;
|
|
|
import com.yoho.search.common.cache.CacheType;
|
...
|
...
|
@@ -50,7 +51,8 @@ public class CommonPageRecallService extends BaseRecallService { |
|
|
* @param paramMap
|
|
|
* @return
|
|
|
*/
|
|
|
@SearchCacheAble(cacheInMinute = 10, needMd5=false,cacheName = "COMMON_PAGE_RECALL_BATCH",cacheType=CacheType.EHCACHE,returnClass = CommonRecallResult.class, excludeParams = { "uid", "order", "page" })
|
|
|
@SearchCacheAble(cacheInMinute = 10, needMd5 = false, cacheName = "COMMON_PAGE_RECALL_BATCH", cacheType = CacheType.EHCACHE, returnClass = CommonRecallResult.class, excludeParams = {
|
|
|
"uid", "order", "page" })
|
|
|
public CommonRecallResult doCommonPageRecallBatch(Map<String, String> paramMap) {
|
|
|
try {
|
|
|
int viewNum = this.getViewNum(paramMap);
|
...
|
...
|
@@ -69,7 +71,7 @@ public class CommonPageRecallService extends BaseRecallService { |
|
|
return commonRecallResult;
|
|
|
}
|
|
|
List<CommonRecallSkn> recallSknList = commonRecallResult.getRecallSknList();
|
|
|
commonRecallResult.setRecallSknList(new ArrayList<CommonRecallSkn>(recallSknList.subList(0, recallMaxPage * viewNum)));
|
|
|
commonRecallResult.setRecallSknList(CollectionUtils.safeSubList(recallSknList, 0, recallMaxPage * viewNum));
|
|
|
return commonRecallResult;
|
|
|
} catch (Exception e) {
|
|
|
logger.error(e.getMessage(), e);
|
...
|
...
|
@@ -139,6 +141,4 @@ public class CommonPageRecallService extends BaseRecallService { |
|
|
return this.buildSearchParam(paramMap, mustFilter, sortBuilders, size);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|