Authored by unknown

fix 用户品牌特征获取

... ... @@ -251,13 +251,14 @@ public class SortRecallSceneService extends AbstractRecallService {
try {
String uid = MapUtils.getString(paramMap, "uid", "0");
String vectorFeatureVersion = searchDynamicConfigService.personalizedSearchVersion();
String userVectorFeature = bigDataRedisService.getUserBrandVectorFeature(uid, vectorFeatureVersion);
JSONArray jsonArray = JSON.parseArray(userVectorFeature);
String userGlobalBrandIds = bigDataRedisService.getUserGlobalFaveriteBrand(uid, vectorFeatureVersion);
logger.warn("uid is [{}],vectorFeatureVersion is [{}], userGlobalBrandIds is [{}]",uid,vectorFeatureVersion,userGlobalBrandIds);
JSONArray brandJsonArray = JSON.parseArray(userGlobalBrandIds);
List<Integer> results = new ArrayList<Integer>();
for (int i = 0; i < jsonArray.size(); i++) {
results.add(Integer.valueOf(jsonArray.getString(i)));
for (int i = 0; i < brandJsonArray.size(); i++) {
results.add(Integer.valueOf(brandJsonArray.getString(i)));
}
logger.warn("[getUserGlobalBrandIds,uid is[{}], brandId is [{}] ]", uid, results);
logger.warn("[getUserGlobalBrandIds,uid is[{}], brandIds is [{}] ]", uid, results);
return results;
} catch (Exception e) {
logger.error(e.getMessage(), e);
... ...