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); // 更新用户积分信息