|
|
package com.yoho.search.service.recall.beans.builder;
|
|
|
|
|
|
import com.yoho.search.base.utils.ConvertUtils;
|
|
|
import com.yoho.search.common.SearchRequestParams;
|
|
|
import com.yoho.search.service.helper.SearchQueryHelper;
|
|
|
import com.yoho.search.service.recall.models.common.ParamQueryFilter;
|
...
|
...
|
@@ -65,7 +66,7 @@ public class UserRecallRequestBuilder { |
|
|
|
|
|
private UserRecallRequest innerBuildUserRecallRequest(ParamQueryFilter paramQueryFilter, Map<String, String> paramMap, int pageSize) {
|
|
|
//1、获取firstSkn参数
|
|
|
List<String> firstProductSkns = this.getFirstProductSkns(paramMap);
|
|
|
List<Integer> firstProductSkns = this.getFirstProductSkns(paramMap);
|
|
|
//2、获取uid和udid
|
|
|
int uid = MapUtils.getIntValue(paramMap, "uid", 0);
|
|
|
String udid = MapUtils.getString(paramMap, "udid", "");
|
...
|
...
|
@@ -78,12 +79,12 @@ public class UserRecallRequestBuilder { |
|
|
return new UserRecallRequest(paramQueryFilter, pageSize, firstProductSkns, uid, udid, pageId, defaultOrder);
|
|
|
}
|
|
|
|
|
|
private List<String> getFirstProductSkns(Map<String, String> paramMap) {
|
|
|
String firstSkns = MapUtils.getString(paramMap, SearchRequestParams.PARAM_SEARCH_FIRST_PRODUCRSKN, "");
|
|
|
if (StringUtils.isBlank(firstSkns)) {
|
|
|
private List<Integer> getFirstProductSkns(Map<String, String> paramMap) {
|
|
|
try {
|
|
|
String firstSkns = MapUtils.getString(paramMap, SearchRequestParams.PARAM_SEARCH_FIRST_PRODUCRSKN, "");
|
|
|
return ConvertUtils.stringToIntList(firstSkns,",");
|
|
|
}catch (Exception e){
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
return Arrays.asList(firstSkns.split(","));
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|