From 4ad0fc5f949708ee4dbd56c0db74673e8dc8040a Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期二, 10 十二月 2024 18:01:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java
index 4bbcdb1..2c88ab4 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java
@@ -74,10 +74,13 @@
 	
 	@Resource
 	private VipSettingClient vipSettingClient;
+
+	@Resource
+	private PointSettingClient pointSettingClient;
 	
 	@Resource
 	private UserChangeLogService userChangeLogService;
-	
+
 	@Value("${file.upload.location}")
 	private String filePath;
 	
@@ -297,7 +300,15 @@
 			appUser.setTotalRedPacketAmount(BigDecimal.ZERO);
 			appUser.setTotalDistributionAmount(BigDecimal.ZERO);
 			appUser.setBalance(BigDecimal.ZERO);
-			appUser.setLavePoint(0);
+			R<PointSetting> pointSettingR = pointSettingClient.getPointSetting(1);
+			if (R.isError(pointSettingR)){
+				throw new RuntimeException("获取积分设置失败");
+			}
+			PointSetting pointSetting = pointSettingR.getData();
+			if (pointSetting == null){
+				throw new RuntimeException("积分设置不存在");
+			}
+			appUser.setLavePoint(pointSetting.getGetRegisPoint());
 			appUser.setTotalPoint(0);
 			//根据平台的配置未达标,则标注为可修改推广人
 			appUser.setChangePromoter(0);

--
Gitblit v1.7.1