商品图库匹配问题修改
This commit is contained in:
parent
3a300fa979
commit
1996e69462
@ -203,20 +203,19 @@ public class SyncShopImageServiceImpl implements SyncShopImageService {
|
||||
List<ShopProductIndex> shopProductIndexList=new ArrayList<>();
|
||||
for (ImageMappingDto imageMappingDto:imageMappingDtos){
|
||||
String mergedImageUrl=imageMappingDto.getMergedImageUrl();
|
||||
if(StringUtils.isEmpty(mergedImageUrl)){
|
||||
continue;
|
||||
}
|
||||
ShopProductImage shopProductImage=new ShopProductImage();
|
||||
if(StringUtils.isNotEmpty(mergedImageUrl)){
|
||||
if(mergedImageUrl.contains(",")){
|
||||
String [] imageUrls= mergedImageUrl.split(",");
|
||||
for (String imageUrl:imageUrls){
|
||||
shopProductImage.setItem_image_other(imageMappingDto.addDomainPrefix(staticDomain,imageUrl));
|
||||
}
|
||||
}else {
|
||||
shopProductImage.setItem_image_other(imageMappingDto.addDomainPrefix(staticDomain,mergedImageUrl));
|
||||
}
|
||||
}
|
||||
ShopProductBase shopProductBase=new ShopProductBase();
|
||||
ShopProductItem shopProductItem=new ShopProductItem();
|
||||
if(mergedImageUrl.contains(",")){
|
||||
String [] imageUrls= mergedImageUrl.split(",");
|
||||
for (String imageUrl:imageUrls){
|
||||
shopProductImage.setItem_image_other(imageMappingDto.addDomainPrefix(staticDomain,imageUrl));
|
||||
}
|
||||
}else {
|
||||
shopProductImage.setItem_image_other(imageMappingDto.addDomainPrefix(staticDomain,mergedImageUrl));
|
||||
}
|
||||
String thumb=imageMappingDto.addDomainPrefix(staticDomain,imageMappingDto.getThumb());
|
||||
shopProductImage.setProduct_id(imageMappingDto.getProductId());
|
||||
shopProductImage.setProduct_image_id(imageMappingDto.getProductImageId());
|
||||
@ -291,8 +290,10 @@ public class SyncShopImageServiceImpl implements SyncShopImageService {
|
||||
productImageSearchDTOS.add(productImageSearchDTO);
|
||||
}
|
||||
}
|
||||
log.info("查询es列表:{}",productImageSearchDTOS);
|
||||
Map<String,List<ProductImageSearchDTO>> productImageList=new HashMap<>();
|
||||
productImageList= searchService.searchProductImageList(productImageSearchDTOS, DicEnum.ES_SEARCH_TYPE_2.getCode());
|
||||
log.info("匹配es返回列表:{}",productImageList);
|
||||
productImageList.forEach((k,v)->{
|
||||
if(!v.isEmpty()){
|
||||
ImageMappingDto imageMappingDto=new ImageMappingDto();
|
||||
@ -306,6 +307,7 @@ public class SyncShopImageServiceImpl implements SyncShopImageService {
|
||||
imageMappingDtos.add(imageMappingDto);
|
||||
}
|
||||
});
|
||||
log.info("匹配图库列表:{}",imageMappingDtos);
|
||||
return imageMappingDtos;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user