SQL,福禄清除

This commit is contained in:
chc
2022-09-05 14:43:37 +08:00
parent 2d4cf29da8
commit 55270548c7
2 changed files with 266 additions and 8 deletions

View File

@@ -87,14 +87,14 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
NativeSearchQuery searchQuery = searchQueryBuilder.build();
log.debug("searchGoods DSL:{}", searchQuery.getQuery());
SearchHits<EsGoodsIndex> search = restTemplate.search(searchQuery, EsGoodsIndex.class);
for (int i = 0; i < search.getSearchHits().size() ; i++){
if (search.getSearchHits().get(i).getContent().getSmall().contains("fuluapiossproductnew.oss-cn-hangzhou.aliyuncs.com")){
search.getSearchHits().get(i).getContent().setSmall(search.getSearchHits().get(i).getContent().getSmall().replace("?x-oss-process=style/200X200", ""));
}
if (search.getSearchHits().get(i).getContent().getThumbnail().contains("fuluapiossproductnew.oss-cn-hangzhou.aliyuncs.com")){
search.getSearchHits().get(i).getContent().setThumbnail(search.getSearchHits().get(i).getContent().getThumbnail().replace("?x-oss-process=style/400X400", ""));
}
}
// for (int i = 0; i < search.getSearchHits().size() ; i++){
// if (search.getSearchHits().get(i).getContent().getSmall().contains("fuluapiossproductnew.oss-cn-hangzhou.aliyuncs.com")){
// search.getSearchHits().get(i).getContent().setSmall(search.getSearchHits().get(i).getContent().getSmall().replace("?x-oss-process=style/200X200", ""));
// }
// if (search.getSearchHits().get(i).getContent().getThumbnail().contains("fuluapiossproductnew.oss-cn-hangzhou.aliyuncs.com")){
// search.getSearchHits().get(i).getContent().setThumbnail(search.getSearchHits().get(i).getContent().getThumbnail().replace("?x-oss-process=style/400X400", ""));
// }
// }
return SearchHitSupport.searchPageFor(search, searchQuery.getPageable());
}