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

更新学员有效课时

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