Authored by WN\wangnan

【图片搜索】 fix

@@ -179,15 +179,17 @@ public class SknImageVectorsServiceImpl implements ISknImageVectorsService, Appl @@ -179,15 +179,17 @@ public class SknImageVectorsServiceImpl implements ISknImageVectorsService, Appl
179 return new SearchApiResult().setCode(500).setMessage("exception"); 179 return new SearchApiResult().setCode(500).setMessage("exception");
180 } 180 }
181 // 4.构造返回结果 181 // 4.构造返回结果
  182 + JSONObject photoListData = new JSONObject();
182 JSONObject dataMap = new JSONObject(); 183 JSONObject dataMap = new JSONObject();
183 dataMap.put("total", searchResult.getTotal()); 184 dataMap.put("total", searchResult.getTotal());
184 dataMap.put("page", searchResult.getPage()); 185 dataMap.put("page", searchResult.getPage());
185 dataMap.put("page_size", searchParam.getSize()); 186 dataMap.put("page_size", searchParam.getSize());
186 dataMap.put("page_total", searchResult.getTotalPage()); 187 dataMap.put("page_total", searchResult.getTotalPage());
187 dataMap.put("product_list", productIndexBaseService.getProductListWithPricePlan(searchResult.getResultList(), Arrays.asList("phrase"))); 188 dataMap.put("product_list", productIndexBaseService.getProductListWithPricePlan(searchResult.getResultList(), Arrays.asList("phrase")));
  189 + photoListData.put("photoListData",dataMap);
188 // 5.将结果存进缓存 190 // 5.将结果存进缓存
189 searchCacheService.addJSONObjectToCache(searchCache, indexName, searchParam, dataMap); 191 searchCacheService.addJSONObjectToCache(searchCache, indexName, searchParam, dataMap);
190 - return new SearchApiResult().setData(dataMap); 192 + return new SearchApiResult().setData(photoListData);
191 } 193 }
192 194
193 195