【修复】修复后台设置注册成为分销商,但是实际注册需要上级推广的情况,改为注册既成功成为分销商。

This commit is contained in:
jianweie code
2023-12-14 15:22:23 +08:00
parent 4f857f2615
commit 14e3638a9f

View File

@@ -694,14 +694,17 @@ public class CoreCmsUserServices : BaseServices<CoreCmsUser>, 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<CoreCmsUser>, 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(); //赠送优惠券数量