lcl преди 1 месец
родител
ревизия
7dc505dd7b
променени са 2 файла, в които са добавени 6 реда и са изтрити 4 реда
  1. 3 2
      Util/HaoDa/ProfitAfterHelper.cs
  2. 3 2
      Util/HaoDa/ProfitBeforeHelper.cs

+ 3 - 2
Util/HaoDa/ProfitAfterHelper.cs

@@ -121,7 +121,7 @@ namespace MySystem
                     foreach (ProfitResult sub in list)
                     {
                         int ProfitType = sub.UserId == UserId ? 0 : 1;
-                        ProfitRewardRecord editprofitrecord = dbnew.ProfitRewardRecord.FirstOrDefault(m => m.UserId == sub.UserId && m.BrandId == 1 && m.ProfitType == ProfitType && m.TradeMonth == TradeMonth);
+                        ProfitRewardRecord editprofitrecord = dbnew.ProfitRewardRecord.FirstOrDefault(m => m.UserId == sub.UserId && m.BrandId == 1 && m.ProfitType == ProfitType && m.TradeMonth == TradeMonth && m.Sort == Sort);
                         if (editprofitrecord == null)
                         {
                             editprofitrecord = dbnew.ProfitRewardRecord.Add(new ProfitRewardRecord()
@@ -136,6 +136,7 @@ namespace MySystem
                                 UpdateMan = topUser.MakerCode, //顶级编号
                                 SeoTitle = sub.RealName, //创客姓名
                                 SeoKeyword = topUser.RealName, //创客姓名
+                                Sort = Sort,
                             }).Entity;
                             dbnew.SaveChanges();
                             string RecordNo = "KPM";
@@ -202,7 +203,7 @@ namespace MySystem
                 {
                     decimal profit = 0;
                     if(Sort == 25) profit = TotalAmount * 0.0002M;
-                    if(Sort == 30) profit = TotalAmount * 0.0007M;
+                    if(Sort == 30) profit = TotalAmount * 0.0005M;
                     ProfitUsers user = users[0];
                     result.Add(new ProfitResult()
                     {

+ 3 - 2
Util/HaoDa/ProfitBeforeHelper.cs

@@ -122,7 +122,7 @@ namespace MySystem
                     foreach (ProfitResult sub in list)
                     {
                         int ProfitType = sub.UserId == UserId ? 0 : 1;
-                        ProfitRewardRecord editprofitrecord = dbnew.ProfitRewardRecord.FirstOrDefault(m => m.UserId == sub.UserId && m.BrandId == 1 && m.ProfitType == ProfitType && m.TradeMonth == TradeMonth);
+                        ProfitRewardRecord editprofitrecord = dbnew.ProfitRewardRecord.FirstOrDefault(m => m.UserId == sub.UserId && m.BrandId == 1 && m.ProfitType == ProfitType && m.TradeMonth == TradeMonth && m.Sort == Sort);
                         if (editprofitrecord == null)
                         {
                             editprofitrecord = dbnew.ProfitRewardRecord.Add(new ProfitRewardRecord()
@@ -137,6 +137,7 @@ namespace MySystem
                                 UpdateMan = topUser.MakerCode, //顶级编号
                                 SeoTitle = sub.RealName, //创客姓名
                                 SeoKeyword = topUser.RealName, //创客姓名
+                                Sort = Sort,
                             }).Entity;
                             dbnew.SaveChanges();
                             string RecordNo = "KPM";
@@ -206,7 +207,7 @@ namespace MySystem
                 {
                     decimal profit = 0;
                     if(Sort == 25) profit = TotalAmount * 0.0002M;
-                    if(Sort == 30) profit = TotalAmount * 0.0007M;
+                    if(Sort == 30) profit = TotalAmount * 0.0005M;
                     ProfitUsers user = users[0];
                     result.Add(new ProfitResult()
                     {