Преглед изворни кода

增加后台调拨返回额度队列程序

lichunlei пре 2 година
родитељ
комит
8f1ce16136
1 измењених фајлова са 23 додато и 0 уклоњено
  1. 23 0
      AppStart/Timer/StoreApplyHelper.cs

+ 23 - 0
AppStart/Timer/StoreApplyHelper.cs

@@ -203,6 +203,29 @@ public class StoreApplyHelper
                             }
                         }
                     }
+                    else if(jsonObj["Kind"].ToString() == "5")
+                    {
+                        int StoreId = int.Parse(jsonObj["Data"]["StoreId"].ToString());
+                        int BrandId = int.Parse(jsonObj["Data"]["BrandId"].ToString());
+                        int OpStoreNum = int.Parse(jsonObj["Data"]["OpStoreNum"].ToString());
+                        StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.Id == StoreId);
+                        if(store != null)
+                        {
+                            decimal Amount = 0;
+                            if(BrandId == 1 || BrandId == 2 || BrandId == 4 || BrandId == 6 || BrandId == 7 || BrandId == 8)
+                            {
+                                Amount += 200;
+                            }
+                            else if(BrandId == 3 || BrandId == 5 || BrandId == 9)
+                            {
+                                Amount += 300;
+                            }
+                            if(Amount > 0)
+                            {
+                                AddAmount(db, store.UserId, Amount, 1);
+                            }
+                        }
+                    }
                     db.SaveChanges();
                 }
             }