From 14e3638a9f767e8c5d8837173dfdf41d47f8df7f Mon Sep 17 00:00:00 2001 From: jianweie code Date: Thu, 14 Dec 2023 15:22:23 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=90=8E=E5=8F=B0=E8=AE=BE=E7=BD=AE=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E6=88=90=E4=B8=BA=E5=88=86=E9=94=80=E5=95=86=EF=BC=8C=E4=BD=86?= =?UTF-8?q?=E6=98=AF=E5=AE=9E=E9=99=85=E6=B3=A8=E5=86=8C=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E4=B8=8A=E7=BA=A7=E6=8E=A8=E5=B9=BF=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=EF=BC=8C=E6=94=B9=E4=B8=BA=E6=B3=A8=E5=86=8C=E6=97=A2=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E6=88=90=E4=B8=BA=E5=88=86=E9=94=80=E5=95=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../User/CoreCmsUserServices.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CoreCms.Net.Services/User/CoreCmsUserServices.cs b/CoreCms.Net.Services/User/CoreCmsUserServices.cs index c85bee68..890a8184 100644 --- a/CoreCms.Net.Services/User/CoreCmsUserServices.cs +++ b/CoreCms.Net.Services/User/CoreCmsUserServices.cs @@ -694,14 +694,17 @@ public class CoreCmsUserServices : BaseServices, ICoreCmsUserServic return jm; } - if (userId > 0 && entity.invitecode > 0 && userInfo.parentId > 0) + if (userId > 0) { - var inviterUserIntegral = CommonHelper - .GetConfigDictionary(allConfigs, SystemSettingConstVars.InviterUserIntegral) - .ObjectToInt(); //是否开启积分功能 - if (inviterUserIntegral > 0) - await _userPointLogServices.SetPoint(userInfo.parentId, inviterUserIntegral, - (int)GlobalEnumVars.UserPointSourceTypes.PointTypeInviterUser, "发展用户:" + userId + "赠送积分"); + if (entity.invitecode > 0 && userInfo.parentId > 0) + { + var inviterUserIntegral = CommonHelper + .GetConfigDictionary(allConfigs, SystemSettingConstVars.InviterUserIntegral) + .ObjectToInt(); //是否开启积分功能 + if (inviterUserIntegral > 0) + await _userPointLogServices.SetPoint(userInfo.parentId, inviterUserIntegral, + (int)GlobalEnumVars.UserPointSourceTypes.PointTypeInviterUser, "发展用户:" + userId + "赠送积分"); + } //是否默认注册分销商 var distributionType = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.DistributionType).ObjectToInt(); //是否默认注册分销商 @@ -727,7 +730,6 @@ public class CoreCmsUserServices : BaseServices, ICoreCmsUserServic userInfo = await _dal.QueryByIdAsync(userId); - var isAllowGiveCoupon = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.IsAllowGiveCoupon).ObjectToInt(); //是否赠送新人优惠券 var selectGiveCoupon = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SelectGiveCoupon).ObjectToInt(); //选择注册赠送优惠券 var giveCouponNumber = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.GiveCouponNumber).ObjectToInt(); //赠送优惠券数量