From b73713beee2747fa352a932d3940be33e1763816 Mon Sep 17 00:00:00 2001 From: Bosen Date: Mon, 6 Dec 2021 22:26:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E7=BD=B2=E6=96=B9=E5=BC=8F=E7=94=B1wa?= =?UTF-8?q?r=E8=BD=AC=E4=B8=BAjar=E5=8C=85=EF=BC=9B=E4=BD=BF=E7=94=A8gitee?= =?UTF-8?q?=E5=9B=BE=E5=BA=8A=E4=BD=9C=E4=B8=BA=E5=9B=BE=E7=89=87=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/jieyue/user/service/UserProductService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/example/jieyue/user/service/UserProductService.java b/src/main/java/com/example/jieyue/user/service/UserProductService.java index 8166f90..c72eb30 100644 --- a/src/main/java/com/example/jieyue/user/service/UserProductService.java +++ b/src/main/java/com/example/jieyue/user/service/UserProductService.java @@ -6,6 +6,7 @@ import com.example.jieyue.common.entity.SysUser; import com.example.jieyue.common.mapper.SysCommentMapper; import com.example.jieyue.common.mapper.SysGoodsMapper; import com.example.jieyue.common.mapper.SysUserMapper; +import com.example.jieyue.common.utils.GiteeImgBedUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -56,7 +57,9 @@ public class UserProductService { *

通过id值获取商品对象

*/ public SysGoods getGoods(int id){ - return goodsMapper.findById(id); + SysGoods goods = goodsMapper.findById(id); + goods.setImg(GiteeImgBedUtils.PRE + goods.getImg()); + return goods; } /**