Commit c3271a4c authored by liudong1993's avatar liudong1993

1

parent 2c482cc8
...@@ -812,7 +812,7 @@ namespace Edu.Module.Course ...@@ -812,7 +812,7 @@ namespace Edu.Module.Course
var model = returnComissionRepository.GetModelByOrderIdStuId(guestModel.OrderId, guestModel.Student_Id); var model = returnComissionRepository.GetModelByOrderIdStuId(guestModel.OrderId, guestModel.Student_Id);
if (model != null && (model.Status==0 || model.Status==1)) if (model != null && (model.Status==0 || model.Status==1))
{ {
var userModel = userReturnComissionRepository.GetModelBySourceId(model.OrderSourceType, model.OrderSourceId,model.CommissionType); var userModel = userReturnComissionRepository.GetModelBySourceId((int)model.OrderSourceType, model.OrderSourceId,model.CommissionType);
userModel.SttlementMoney -= model.CommissionMoeny; userModel.SttlementMoney -= model.CommissionMoeny;
if (model.Status == 1) if (model.Status == 1)
{ {
......
...@@ -406,7 +406,7 @@ namespace Edu.Module.Course ...@@ -406,7 +406,7 @@ namespace Edu.Module.Course
{ {
Id = 0, Id = 0,
OrderId = model.OrderId, OrderId = model.OrderId,
OrderSourceType = x.CreateType.ToInt(), OrderSourceType = x.CreateType,
OrderSourceId = x.CreateType == StuCreateTypeEnum.EmployeeInput ? x.CreateBy : (x.CreateType == StuCreateTypeEnum.CustomerInput? x.CustomerId : x.StuSourceId), OrderSourceId = x.CreateType == StuCreateTypeEnum.EmployeeInput ? x.CreateBy : (x.CreateType == StuCreateTypeEnum.CustomerInput? x.CustomerId : x.StuSourceId),
Status = -1, //下单默认为不可返佣,等待付款完成后更新为待返佣 Status = -1, //下单默认为不可返佣,等待付款完成后更新为待返佣
UnionCashOutId = 0, UnionCashOutId = 0,
...@@ -466,7 +466,7 @@ namespace Edu.Module.Course ...@@ -466,7 +466,7 @@ namespace Edu.Module.Course
userResult.ToList().ForEach(x => userResult.ToList().ForEach(x =>
{ {
var userModel = userReturnComissionRepository.GetModelBySourceId(x.OrderSourceType, x.OrderSourceId, x.CommissionType); var userModel = userReturnComissionRepository.GetModelBySourceId((int)x.OrderSourceType, x.OrderSourceId, x.CommissionType);
if (userModel != null && userModel.UserId > 0) if (userModel != null && userModel.UserId > 0)
{ {
userModel.CanCashOutMoney += x.CommissionMoeny; userModel.CanCashOutMoney += x.CommissionMoeny;
...@@ -571,14 +571,14 @@ namespace Edu.Module.Course ...@@ -571,14 +571,14 @@ namespace Edu.Module.Course
if (courseModel != null) if (courseModel != null)
{ {
var sellPrice = courseModel.SellPrice * ((100-(m.CommissionType == 1 ? courseModel.B2CRatio : courseModel.B2CReNewRatio)) / 100); var sellPrice = courseModel.SellPrice * ((100-(m.CommissionType == 1 ? courseModel.B2CRatio : courseModel.B2CReNewRatio)) / 100);
if (m.OrderSourceType == 1) if ((int)m.OrderSourceType == 1)
{ {
m.CommissionMoeny = sellPrice * ((m.CommissionType == 1 ? courseModel.B2CRbRatio : courseModel.B2CRNRatio)/100); m.CommissionMoeny = sellPrice * ((m.CommissionType == 1 ? courseModel.B2CRbRatio : courseModel.B2CRNRatio)/100);
m.CommissionReType = m.CommissionType == 1 ? courseModel.B2CRbRatioType.ToInt() : courseModel.B2CRNRatioType.ToInt(); m.CommissionReType = m.CommissionType == 1 ? courseModel.B2CRbRatioType.ToInt() : courseModel.B2CRNRatioType.ToInt();
m.CommissionReValue = m.CommissionType == 1 ? courseModel.B2CRbRatioValue : courseModel.B2CRNRatioValue; m.CommissionReValue = m.CommissionType == 1 ? courseModel.B2CRbRatioValue : courseModel.B2CRNRatioValue;
m.Remark = $"学员来源为:直客,学员为{(m.CommissionType == 1 ? "首次报名" : "续费报名")},本次报名金额为:{sellPrice},本次返佣金额为:{m.CommissionMoeny.ToString("0.00")}"; m.Remark = $"学员来源为:直客,学员为{(m.CommissionType == 1 ? "首次报名" : "续费报名")},本次报名金额为:{sellPrice},本次返佣金额为:{m.CommissionMoeny.ToString("0.00")}";
} }
else if (m.OrderSourceType == 2) else if ((int)m.OrderSourceType == 2)
{ {
var customerModel = customerRepository.GetEntity(m.OrderSourceId); var customerModel = customerRepository.GetEntity(m.OrderSourceId);
if (customerModel.CustomerType == 1) if (customerModel.CustomerType == 1)
...@@ -596,14 +596,14 @@ namespace Edu.Module.Course ...@@ -596,14 +596,14 @@ namespace Edu.Module.Course
m.Remark = $"学员来源为:校代,学员为{(m.CommissionType == 1 ? "首次报名" : "续费报名")},本次报名金额为:{sellPrice},本次返佣金额为:{m.CommissionMoeny.ToString("0.00")}"; m.Remark = $"学员来源为:校代,学员为{(m.CommissionType == 1 ? "首次报名" : "续费报名")},本次报名金额为:{sellPrice},本次返佣金额为:{m.CommissionMoeny.ToString("0.00")}";
} }
} }
else if (m.OrderSourceType == 3) else if ((int)m.OrderSourceType == 3)
{ {
m.CommissionMoeny = sellPrice * ((m.CommissionType == 1 ? courseModel.InnerRecommendRatio : courseModel.InnerRecommendReNewRatio)/100); m.CommissionMoeny = sellPrice * ((m.CommissionType == 1 ? courseModel.InnerRecommendRatio : courseModel.InnerRecommendReNewRatio)/100);
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.Value;
m.Remark = $"学员来源为:内部介绍,学员为{(m.CommissionType == 1 ? "首次报名" : "续费报名")},本次报名金额为:{sellPrice},本次返佣金额为:{m.CommissionMoeny.ToString("0.00")}"; m.Remark = $"学员来源为:内部介绍,学员为{(m.CommissionType == 1 ? "首次报名" : "续费报名")},本次报名金额为:{sellPrice},本次返佣金额为:{m.CommissionMoeny.ToString("0.00")}";
} }
else if (m.OrderSourceType == 4) else if ((int)m.OrderSourceType == 4)
{ {
m.CommissionMoeny = sellPrice * ((m.CommissionType == 1 ? (courseModel.TransIntroductceRatio) : courseModel.TransIntroductceReNewRatio)/100); m.CommissionMoeny = sellPrice * ((m.CommissionType == 1 ? (courseModel.TransIntroductceRatio) : courseModel.TransIntroductceReNewRatio)/100);
m.CommissionReType = m.CommissionType == 1 ? courseModel.TransIntroductceRatioType.ToInt() : courseModel.TransIntroductceReNewRatioType.ToInt(); m.CommissionReType = m.CommissionType == 1 ? courseModel.TransIntroductceRatioType.ToInt() : courseModel.TransIntroductceReNewRatioType.ToInt();
...@@ -3557,7 +3557,7 @@ namespace Edu.Module.Course ...@@ -3557,7 +3557,7 @@ namespace Edu.Module.Course
var model = returnComissionRepository.GetModelByOrderIdStuId(orderId, stuId); var model = returnComissionRepository.GetModelByOrderIdStuId(orderId, stuId);
if (model != null && model.Status == -1) if (model != null && model.Status == -1)
{ {
var userModel = userReturnComissionRepository.GetModelBySourceId(model.OrderSourceType, model.OrderSourceId, model.CommissionType); var userModel = userReturnComissionRepository.GetModelBySourceId((int)model.OrderSourceType, model.OrderSourceId, model.CommissionType);
userModel.UnSettlementMoney += model.CommissionMoeny; userModel.UnSettlementMoney += model.CommissionMoeny;
Dictionary<string, object> userKeyValues = new Dictionary<string, object>() Dictionary<string, object> userKeyValues = new Dictionary<string, object>()
{ {
......
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