Commit 6be708bc authored by 黄奎's avatar 黄奎

更新学员有效课时

parent 96f613b5
......@@ -674,7 +674,7 @@ namespace Edu.Module.Course
m.CommissionMoeny = m.CommissionType == 1 ? courseModel.InnerRecommendRatio : courseModel.InnerRecommendReNewRatio;
}
m.CommissionReType = m.CommissionType == 1 ? courseModel.InnerRecommendRatioType.ToInt() : courseModel.InnerRecommendReNewRatioType.ToInt();
m.CommissionReValue = m.CommissionType == 1 ? courseModel.InnerRecommendRatioValue : courseModel.InnerRecommendReNewRatioValue.Value;
m.CommissionReValue = m.CommissionType == 1 ? courseModel.InnerRecommendRatioValue : (courseModel?.InnerRecommendReNewRatioValue ?? 0);
m.Remark = $"学员来源为:内部介绍,学员为{(m.CommissionType == 1 ? "首次报名" : "续费报名")},本次报名金额为:{sellPrice},本次返佣金额为:{m.CommissionMoeny:0.00}";
}
else if ((int)m.OrderSourceType == 4)
......@@ -4116,9 +4116,9 @@ namespace Edu.Module.Course
decimal validClassHours = cmodel.Unit_Price > 0 ? Math.Round(cmodel.Income / cmodel.Unit_Price, 2, MidpointRounding.AwayFromZero) : 0;
Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Order_Guest.ValidClassHours),validClassHours}
};
{
{ nameof(RB_Order_Guest.ValidClassHours),validClassHours}
};
//HK2021-07-19新增【有效课时大于完成课时修改学员状态为正常】
string LogContent = "";
if (gmodel.CompleteHours <= validClassHours)
......@@ -4142,14 +4142,14 @@ namespace Edu.Module.Course
});
}
List<WhereHelper> wheres = new List<WhereHelper>()
{
new WhereHelper()
{
FiledName=nameof(RB_Order_Guest.Id),
FiledValue=guestId,
OperatorEnum= OperatorEnum.Equal
}
};
new WhereHelper()
{
FiledName=nameof(RB_Order_Guest.Id),
FiledValue=guestId,
OperatorEnum= OperatorEnum.Equal
}
};
order_GuestRepository.Update(keyValues, wheres);
}
}
......@@ -4161,10 +4161,16 @@ namespace Edu.Module.Course
});
if (studentMapping.Any())
{
UpdateReturnMoneyStatus(studentMapping.First().Student_Id, gmodel.OrderId, omodel);
try
{
UpdateReturnMoneyStatus(studentMapping.First().Student_Id, gmodel.OrderId, omodel);
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Write(ex, string.Format("UpdateStudentValidClassHours__GuestId:{0} Money:{2} ", guestId, money));
}
}
}
return true;
}
......@@ -4198,26 +4204,26 @@ namespace Edu.Module.Course
{ nameof(RB_User_ReturnComission_ViewModel.UnSettlementMoney),userModel.UnSettlementMoney}
};
List<WhereHelper> userWheres = new List<WhereHelper>()
{
new WhereHelper()
{
FiledName=nameof(RB_User_ReturnComission_ViewModel.UserType),
FiledValue=model.OrderSourceType,
OperatorEnum= OperatorEnum.Equal
},
new WhereHelper()
{
FiledName=nameof(RB_User_ReturnComission_ViewModel.UserId),
FiledValue=model.OrderSourceId,
OperatorEnum= OperatorEnum.Equal
},
new WhereHelper()
{
FiledName=nameof(RB_User_ReturnComission_ViewModel.CommissionType),
FiledValue=model.CommissionType,
OperatorEnum= OperatorEnum.Equal
}
};
new WhereHelper()
{
FiledName=nameof(RB_User_ReturnComission_ViewModel.UserType),
FiledValue=model.OrderSourceType,
OperatorEnum= OperatorEnum.Equal
},
new WhereHelper()
{
FiledName=nameof(RB_User_ReturnComission_ViewModel.UserId),
FiledValue=model.OrderSourceId,
OperatorEnum= OperatorEnum.Equal
},
new WhereHelper()
{
FiledName=nameof(RB_User_ReturnComission_ViewModel.CommissionType),
FiledValue=model.CommissionType,
OperatorEnum= OperatorEnum.Equal
}
};
userReturnComissionRepository.Update(userKeyValues, userWheres);
}
else
......
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