...
|
...
|
@@ -179,15 +179,17 @@ public class SknImageVectorsServiceImpl implements ISknImageVectorsService, Appl |
|
|
return new SearchApiResult().setCode(500).setMessage("exception");
|
|
|
}
|
|
|
// 4.构造返回结果
|
|
|
JSONObject photoListData = new JSONObject();
|
|
|
JSONObject dataMap = new JSONObject();
|
|
|
dataMap.put("total", searchResult.getTotal());
|
|
|
dataMap.put("page", searchResult.getPage());
|
|
|
dataMap.put("page_size", searchParam.getSize());
|
|
|
dataMap.put("page_total", searchResult.getTotalPage());
|
|
|
dataMap.put("product_list", productIndexBaseService.getProductListWithPricePlan(searchResult.getResultList(), Arrays.asList("phrase")));
|
|
|
photoListData.put("photoListData",dataMap);
|
|
|
// 5.将结果存进缓存
|
|
|
searchCacheService.addJSONObjectToCache(searchCache, indexName, searchParam, dataMap);
|
|
|
return new SearchApiResult().setData(dataMap);
|
|
|
return new SearchApiResult().setData(photoListData);
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|