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(); //赠送优惠券数量