Commit 3606f2da authored by liudong1993's avatar liudong1993

Merge branch 'master' of http://gitlab.oytour.com/Kui2/mall.oytour.com into sdzq-ld

parents b2889820 b28237b6
......@@ -617,24 +617,57 @@ namespace Mall.Module.Education
{
orderId = model.ID;
}
if (model.OrderStaus == Common.Enum.Point.OrderStausEnum.Paid && model.TotalPointNum > 0)
{
RB_Member_PointBalance_Extend memberBalanceModel = new RB_Member_PointBalance_Extend
{
OrderId = orderId,
UserId = model.UserId,
Type = Common.Enum.MarketingCenter.RecordTypeEnum.Income,
Type = Common.Enum.MarketingCenter.RecordTypeEnum.Expend,
PonitNum = model.TotalPointNum,
Description = "购买直播课程消费" + model.TotalPointNum + "点",
CreateDate = System.DateTime.Now,
TenantId = model.TenantId,
MallBaseId = model.MallBaseId,
Remarks = "上课时间:" + model.StudyDate.ToString("yyyy-MM-dd HH:mm") + "时长" + model.TotalStudyDuration.ToString("f2") + Common.Plugin.EnumHelper.GetEnumName(model.DurationUnit) ,
Remarks = "上课时间:" + model.StudyDate.ToString("yyyy-MM-dd HH:mm") + "时长" + model.TotalStudyDuration.ToString("f2") + Common.Plugin.EnumHelper.GetEnumName(model.DurationUnit),
PlatformType = umodel.Source
};
memberPointBalanceRepository.Insert(memberBalanceModel, trans);
IDictionary<string, object> filedsUser = new Dictionary<string, object>
{
{ nameof(Model.Entity.User.RB_Member_User.PointNum), umodel.PointNum-model.TotalPointNum }
};
IList<WhereHelper> userWhereHelpers = new List<WhereHelper>
{
new WhereHelper()
{
FiledName = nameof(Model.Entity.User.RB_Member_User.Id),
FiledValue = umodel.Id,
OperatorEnum = OperatorEnum.Equal
},
new WhereHelper()
{
FiledName = nameof(Model.Entity.User.RB_Member_User.TenantId),
FiledValue = umodel.TenantId,
OperatorEnum = OperatorEnum.Equal
},
new WhereHelper()
{
FiledName = nameof(Model.Entity.User.RB_Member_User.MallBaseId),
FiledValue = umodel.MallBaseId,
OperatorEnum = OperatorEnum.Equal
}
};
member_UserRepository.Update(filedsUser, userWhereHelpers, trans);
}
return flag;
}
#endregion
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment