...
|
...
|
@@ -62,7 +62,7 @@ public class RecommendOnProductAnalysisService { |
|
|
|
|
|
List<Integer> sortIds = getRecommendSortWithPersonal(paramMap, viewNum, uid, udid);
|
|
|
JSONObject data = new JSONObject();
|
|
|
data.put("sortIds", sortIds);
|
|
|
data.put("misortIds", sortIds);
|
|
|
return new SearchApiResult().setData(data);
|
|
|
}catch (Exception e) {
|
|
|
LOGGER.error(e.getMessage(), e);
|
...
|
...
|
@@ -96,9 +96,9 @@ public class RecommendOnProductAnalysisService { |
|
|
List<Integer> hotShopIds = getHotShops(paramMap);
|
|
|
List<Integer> newOpenShopIds = getNewOpenShops(paramMap);
|
|
|
JSONObject data = new JSONObject();
|
|
|
data.put("seenShopIds", seenShopIds);
|
|
|
data.put("viewedShopIds", seenShopIds);
|
|
|
data.put("hotShopIds", hotShopIds);
|
|
|
data.put("newOpenShopIds", newOpenShopIds);
|
|
|
data.put("newShopIds", newOpenShopIds);
|
|
|
return new SearchApiResult().setData(data);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -107,7 +107,6 @@ public class RecommendOnProductAnalysisService { |
|
|
paramMapClone.putAll(paramMap);
|
|
|
List<Integer> shopIds = new ArrayList<>();
|
|
|
try {
|
|
|
addShopCreateTime(paramMapClone);
|
|
|
addDefaultParamsToParamMap(paramMapClone);
|
|
|
JSONObject aggResult = aggregationsService.getShopAggregationResult(paramMapClone, 8);
|
|
|
if (aggResult != null && !CollectionUtils.isEmpty(aggResult.getJSONArray("shopAgg"))) {
|
...
|
...
|
@@ -445,12 +444,6 @@ public class RecommendOnProductAnalysisService { |
|
|
paramMap.put(SearchRequestParams.PARAM_SEARCH_SHELVETIME, begin + "," + end);
|
|
|
}
|
|
|
|
|
|
private void addShopCreateTime(Map<String, String> paramMap) {
|
|
|
long end = DateUtil.getLastTimeSecond(new Date());
|
|
|
long begin = DateUtil.getFirstTimeSecond(DateUtil.addDay(new Date(), -50));
|
|
|
paramMap.put(SearchRequestParams.PARAM_SEARCH_SHOP_CREATE_TIME, begin + "," + end);
|
|
|
}
|
|
|
|
|
|
//获取用户行为
|
|
|
private UserPersonalFactorRspNew getUserPersonalFactor(int uid, String udid) {
|
|
|
return userComponent.queryUserPersionalFactor(uid, udid, null);
|
...
|
...
|
|