Authored by hugufei

如果价格带向量为空,则向量计算出的品类品牌设为空

... ... @@ -17,6 +17,9 @@ public class SortBrandVectorComponent {
private SortBrandVectorCacheBean sortBrandVectorCacheBean;
public List<SortBrand> queryVectorSortBrandList(List<SortBrand> pageSortBrands,Set<String> filterKeys, List<Double> userVectorList, int count){
if(userVectorList==null || userVectorList.isEmpty()){
return new ArrayList<>();
}
List<SortBrandVectorScore> sortBrandVectorScores = new ArrayList<>();
for (SortBrand sortBrand:pageSortBrands) {
if(filterKeys.contains(sortBrand.key())){
... ...
... ... @@ -47,6 +47,9 @@ public class UserPersionalFactorComponent {
if(rsp.getSortPriceAreasList()==null){
rsp.setSortPriceAreasList(new ArrayList<>());
}
if(rsp.getSortBrandVector()==null){
rsp.setSortBrandVector(new ArrayList<>());
}
return rsp;
} catch (Exception e) {
RECALL_NEW_LOGGER.error(e.getMessage(), e);
... ...