瀏覽代碼

押金单位判断

lichunlei 1 年之前
父節點
當前提交
20b5b00be5
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      AppStart/Helper/StatService.cs

+ 7 - 3
AppStart/Helper/StatService.cs

@@ -381,7 +381,8 @@ namespace MySystem
                             TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
                         }
                         decimal ActPrize = decimal.Parse(function.CheckNum(pos.SeoKeyword));
-                        if (pos.BrandId == 1 || pos.BrandId == 3 || pos.BrandId == 4 || pos.BrandId == 5 || pos.BrandId == 6 || pos.BrandId == 8 || pos.BrandId == 9)
+                        KqProducts brand = db.KqProducts.FirstOrDefault(m => m.Id == pos.BrandId) ?? new KqProducts();
+                        if (brand.NoticeMoneyUnit == 2)
                         {
                             ActPrize = ActPrize / 100;
                         }
@@ -810,7 +811,8 @@ namespace MySystem
                         TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
                     }
                     decimal ActPrize = decimal.Parse(function.CheckNum(merchant.SeoKeyword));
-                    if (pos.BrandId == 1 || pos.BrandId == 3 || pos.BrandId == 4 || pos.BrandId == 5 || pos.BrandId == 6 || pos.BrandId == 8 || pos.BrandId == 9)
+                    KqProducts brand = db.KqProducts.FirstOrDefault(m => m.Id == pos.BrandId) ?? new KqProducts();
+                    if (brand.NoticeMoneyUnit == 2)
                     {
                         ActPrize = ActPrize / 100;
                     }
@@ -1533,7 +1535,9 @@ namespace MySystem
                     DateTime TradeDate = trade.CreateDate.Value;
                     string TradeMonth = TradeDate.ToString("yyyyMM");
                     decimal FeeAmount = trade.FeeAmount; //流量费
-                    if (trade.ProductType == "1" || trade.ProductType == "4" || trade.ProductType == "6" || trade.ProductType == "8" || trade.ProductType == "9")
+                    int BrandId = int.Parse(trade.ProductType);
+                    KqProducts brand = db.KqProducts.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
+                    if (brand.NoticeMoneyUnit == 2)
                     {
                         FeeAmount = FeeAmount / 100;
                     }