lichunlei 2 năm trước cách đây
mục cha
commit
0809ac9a6d
1 tập tin đã thay đổi với 13 bổ sung2 xóa
  1. 13 2
      AppStart/Timer/StoreApplyHelper.cs

+ 13 - 2
AppStart/Timer/StoreApplyHelper.cs

@@ -182,13 +182,24 @@ public class StoreApplyHelper
                         StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.Id == StoreId);
                         if(store != null)
                         {
-                            decimal 
+                            decimal Amount = 0;
                             string[] SnIdList = SnIds.Split(',');
                             foreach(string SnIdString in SnIdList)
                             {
                                 int SnId = int.Parse(SnIdString);
                                 PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnId) ?? new PosMachinesTwo();
-
+                                if(pos.BrandId == 1 || pos.BrandId == 2 || pos.BrandId == 4 || pos.BrandId == 6 || pos.BrandId == 7 || pos.BrandId == 8)
+                                {
+                                    Amount += 200;
+                                }
+                                else if(pos.BrandId == 3 || pos.BrandId == 5 || pos.BrandId == 9)
+                                {
+                                    Amount += 300;
+                                }
+                            }
+                            if(Amount > 0)
+                            {
+                                AddAmount(db, store.UserId, Amount, 1);
                             }
                         }
                     }