|
@@ -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);
|