From 856970300c19b04adec6f7445873d4e08c57fdb5 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 11 八月 2025 19:41:34 +0800
Subject: [PATCH] update

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrderServiceImpl.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrderServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrderServiceImpl.java
index f02c5c7..f3ff864 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrderServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrderServiceImpl.java
@@ -143,10 +143,11 @@
                     order.setCommissionPrice(userCommissionMoney);
                     if(userCommissionMoney.doubleValue()>0){
                         TbUser shareUser = userService.getById(user.getInviteId());
-                        BigDecimal add = shareUser.getBalance().add(order.getCommissionPrice());
-                        shareUser.setBalance(add);
-                        shareUser.updateById();
-
+                        if(shareUser!=null){
+                            BigDecimal add = shareUser.getBalance().add(order.getCommissionPrice());
+                            shareUser.setBalance(add);
+                            shareUser.updateById();
+                        }
                         TbAccountDetail accountDetail = new TbAccountDetail();
                         accountDetail.setUserId(user.getInviteId());
                         accountDetail.setType(1);

--
Gitblit v1.7.1