Browse Source

升级交易额算上码牌非活动交易额

lcl 1 year ago
parent
commit
72309626f9
1 changed files with 12 additions and 2 deletions
  1. 12 2
      AppStart/Helper/StatService.cs

+ 12 - 2
AppStart/Helper/StatService.cs

@@ -2046,17 +2046,27 @@ namespace MySystem
                                 //助利宝团队交易额
                                 TradeAmount += HelpProfitTradeSummaryDbconn.Instance.GetTrade(user.Id, TradeMonth, "team");
                                 //码牌团队交易额(直联)
-                                check = mpmaindb.UserAmountSummary.Any(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team");
+                                check = mpmaindb.UserAmountSummary.Any(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 1);
                                 if (check)
                                 {
                                     TradeAmount += mpmaindb.UserAmountSummary.Where(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 1).Sum(m => m.TotalAmount) * 4;
                                 }
+                                check = mpmaindb.UserAmountSummary.Any(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 0);
+                                if (check)
+                                {
+                                    TradeAmount += mpmaindb.UserAmountSummary.Where(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 0).Sum(m => m.TotalAmount);
+                                }
                                 //码牌团队交易额(银联)
-                                check = mpmaindb2.UserAmountSummary.Any(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team");
+                                check = mpmaindb2.UserAmountSummary.Any(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 1);
                                 if (check)
                                 {
                                     TradeAmount += mpmaindb2.UserAmountSummary.Where(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 1).Sum(m => m.TotalAmount) * 4;
                                 }
+                                check = mpmaindb2.UserAmountSummary.Any(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 0);
+                                if (check)
+                                {
+                                    TradeAmount += mpmaindb2.UserAmountSummary.Where(m => m.UserId == user.Id && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 0).Sum(m => m.TotalAmount);
+                                }
                                 //广电卡扶持期按1万/张计入职级
                                 List<int> BrandIds = new List<int>();
                                 BrandIds.Add(14);