图库图片路径问题修复

This commit is contained in:
liyj 2025-11-27 10:13:08 +08:00
parent 45469be52d
commit fb10c6e173

View File

@ -158,7 +158,7 @@ public class LibraryProductImpl extends BaseServiceImpl<LibraryProductMapper, Li
Map<Long,List<LibraryProductImage>> listMap=new HashMap<>(); Map<Long,List<LibraryProductImage>> listMap=new HashMap<>();
libraryProductImageList.forEach(libraryProductImage -> { libraryProductImageList.forEach(libraryProductImage -> {
libraryProductImage.setImageUrl(staticDomain+libraryProductImage.getImageUrl()); libraryProductImage.setImageUrl(com.suisung.mall.common.utils.CommonUtil.addDomainPrefix(staticDomain,libraryProductImage.getImageUrl()));
List<LibraryProductImage> productImageList=listMap.get(libraryProductImage.getProductId()); List<LibraryProductImage> productImageList=listMap.get(libraryProductImage.getProductId());
if(null==productImageList){ if(null==productImageList){
productImageList=new ArrayList<>(); productImageList=new ArrayList<>();
@ -168,7 +168,7 @@ public class LibraryProductImpl extends BaseServiceImpl<LibraryProductMapper, Li
}); });
libraryProductList.forEach(libraryProduct->{ libraryProductList.forEach(libraryProduct->{
libraryProduct.setThumb(staticDomain+libraryProduct.getThumb()); libraryProduct.setThumb(com.suisung.mall.common.utils.CommonUtil.addDomainPrefix(staticDomain,libraryProduct.getThumb()));
if(null==listMap.get(libraryProduct.getId())){ if(null==listMap.get(libraryProduct.getId())){
libraryProduct.setProduct_image_list(Collections.emptyList()); libraryProduct.setProduct_image_list(Collections.emptyList());
}else { }else {