From f6b7ca9ceb65c331d3c35b7fa223cbffabc5773f Mon Sep 17 00:00:00 2001 From: huangyawei Date: Thu, 1 Aug 2024 21:58:51 +0800 Subject: [PATCH] =?UTF-8?q?release-=20=E4=BF=AE=E5=A4=8DuserInfo=E7=9A=84p?= =?UTF-8?q?oint=3D0=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/luoo/user/service/UserPointLogService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java b/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java index a8c1537..73727ad 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/UserPointLogService.java @@ -166,7 +166,7 @@ public class UserPointLogService { // 更新用户积分,获取用户信息并累加积分得分 // 对用户进行积分计算 UserInfo userInfo = userInfoDao.findById(userPointLog.getUserId()).get(); - Integer point = userInfo.getPoint(); + Integer point = userInfo.getPoint() == null ? 0 : userInfo.getPoint(); point += userPointLog.getScore(); userInfo.setPoint(point); // 更新用户积分信息