Commit 983a858b authored by gitrocyang's avatar gitrocyang Committed by linlinjava
Browse files

修复进入商品详情加载商品评论时,因评论用户信息不存在的情况导致的NullPoint异常。 (#148)

parent 8219d12f
...@@ -130,8 +130,8 @@ public class WxGoodsController { ...@@ -130,8 +130,8 @@ public class WxGoodsController {
c.put("addTime", comment.getAddTime()); c.put("addTime", comment.getAddTime());
c.put("content", comment.getContent()); c.put("content", comment.getContent());
LitemallUser user = userService.findById(comment.getUserId()); LitemallUser user = userService.findById(comment.getUserId());
c.put("nickname", user.getNickname()); c.put("nickname", user == null ? "" : user.getNickname());
c.put("avatar", user.getAvatar()); c.put("avatar", user == null ? "" : user.getAvatar());
c.put("picList", comment.getPicUrls()); c.put("picList", comment.getPicUrls());
commentsVo.add(c); commentsVo.add(c);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment