Jelajahi Sumber

修改品牌

plf 4 tahun lalu
induk
melakukan
85cffd0945

+ 3 - 1
src/main/java/com/caimei/www/service/page/impl/ProductServiceImpl.java

@@ -3,6 +3,7 @@ package com.caimei.www.service.page.impl;
 import com.caimei.www.mapper.ProductDao;
 import com.caimei.www.pojo.page.ProductDetail;
 import com.caimei.www.service.page.ProductService;
+import com.caimei.www.utils.ImageUtil;
 import io.netty.util.internal.StringUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
@@ -34,10 +35,11 @@ public class ProductServiceImpl implements ProductService {
     @Override
     public ProductDetail getProductDetailById(Integer productId) {
         ProductDetail product = productDao.getProductDetailById(productId);
-        if (null != product){
+        if (null != product) {
             if (!StringUtil.isNullOrEmpty(product.getTags())) {
                 product.setTagList(product.getTags().split(","));
             }
+            product.setImage(ImageUtil.getImageURL("product", product.getImage(), 0, domain));
             // 价格等级
             if (product.getPrice() > 50 * 5000) {
                 product.setPriceGrade(5);