Commit 534bc26c authored by liudong1993's avatar liudong1993

使用课程卡的订单不返佣

parent d0e9d33f
......@@ -4998,8 +4998,8 @@ namespace Mall.Module.Product
{
item.Grade = FXList.Where(x => x.Id == item.FXGradeId).FirstOrDefault()?.Grade ?? 0;
}
//开始慢慢找 注 同级返佣数量 返佣建子表可以无限级返佣了
var DetailList = demodel.DetailList.Where(x => x.CommissionPrice > 0).ToList();
//开始慢慢找 注 同级返佣数量 返佣建子表可以无限级返佣了 --2020/10/16 未使用课程卡的才能返佣
var DetailList = demodel.DetailList.Where(x => x.CommissionPrice > 0 && (x.EducationCouponId ?? 0) == 0).ToList();
foreach (var item in DetailList)
{
if ((item.PresentFXGrade ?? 0) > 0)
......@@ -5507,7 +5507,7 @@ namespace Mall.Module.Product
dgradeList = distributor_GradeRepository.GetList(new RB_Distributor_Grade_Extend() { GradeIds = string.Join(",", gradeIdlist), TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
}
#endregion
foreach (var item in demodel.DetailList)
foreach (var item in demodel.DetailList.Where(x => (x.EducationCouponId ?? 0) == 0))
{
decimal fmoney = (item.Final_Price ?? 0);
if (demodel.SmallShopsId > 0 && item.Final_Price != item.SmallShopsCostPrice)
......@@ -5788,7 +5788,7 @@ namespace Mall.Module.Product
}
#region 推荐返佣
if (demodel.DetailList.Where(x => x.SupplierId > 0).Any())
if (demodel.DetailList.Where(x => x.SupplierId > 0 && (x.EducationCouponId??0) == 0).Any())
{
string supplierIds = string.Join(",", demodel.DetailList.Where(x => x.SupplierId > 0).Select(x => x.SupplierId));
var supplist = supplierRepository.GetList(new RB_Supplier_Extend() { SupplierIds = supplierIds }).Where(x => x.Introducer > 0).ToList();
......@@ -5798,7 +5798,7 @@ namespace Mall.Module.Product
//查出返佣的比例
var scList = supplierCommissionRepository.GetListBySupplierIds(string.Join(",", supplist.Select(x => x.ID)));
//查出所有的订单
var detailList = demodel.DetailList.Where(x => supplist.Select(x => x.ID).Contains(x.SupplierId)).ToList();
var detailList = demodel.DetailList.Where(x => supplist.Select(x => x.ID).Contains(x.SupplierId) && (x.EducationCouponId??0) == 0).ToList();
foreach (var item in detailList)
{
decimal fmoney = (item.Final_Price ?? 0);
......@@ -5842,12 +5842,12 @@ namespace Mall.Module.Product
#endregion
#region 微店返佣
if (demodel.SmallShopsId > 0 && demodel.DetailList.Where(x => x.Final_Price != x.SmallShopsCostPrice).Any())
if (demodel.SmallShopsId > 0 && demodel.DetailList.Where(x => x.Final_Price != x.SmallShopsCostPrice && (x.EducationCouponId??0) == 0).Any())
{
var smallModel = smallShops_InfoRepository.GetEntity(demodel.SmallShopsId);
if (smallModel.AuditStatus == DistributorAuditStatusEnum.Audited)
{
foreach (var item in demodel.DetailList.Where(x => x.Final_Price != x.SmallShopsCostPrice).ToList())
foreach (var item in demodel.DetailList.Where(x => x.Final_Price != x.SmallShopsCostPrice && (x.EducationCouponId??0) == 0).ToList())
{
decimal sscommission = (item.Final_Price ?? 0) - (item.SmallShopsCostPrice ?? 0);
string CouponDestription = "";
......
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