Browse Source

Merge branch 'develop' of http://47.109.31.237:13000/kxs-end/main-server into develop

lichunlei 2 years ago
parent
commit
daf53e600d
2 changed files with 10 additions and 9 deletions
  1. 2 1
      AppStart/Helper/StatService.cs
  2. 8 8
      AppStart/Timer/StoreApplyHelper.cs

+ 2 - 1
AppStart/Helper/StatService.cs

@@ -383,7 +383,8 @@ namespace MySystem
         public void doActiveReward(WebCMSEntities db, PosMerchantInfo merchant, PosMachinesTwo pos, int GetUserId, string ParentNav, int TopUserId, decimal ActPrize, int ChangeType = 0, int ActType = 0)
         {
             bool check = db.ActiveReward.Any(m => m.KqMerNo == merchant.KqMerNo && m.RewardAmount == ActPrize);
-            if (!check)
+            bool check1 = db.ActiveReward.Any(m => m.KqSnNo == pos.PosSn && m.RewardAmount == ActPrize);
+            if (!check && !check1)
             {
                 Users machineUser = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new Users();
                 db.ActiveReward.Add(new ActiveReward()

+ 8 - 8
AppStart/Timer/StoreApplyHelper.cs

@@ -33,15 +33,15 @@ public class StoreApplyHelper
             WebCMSEntities db = new WebCMSEntities();
             try
             {
-                // if(DateTime.Now.Day == 1 && DateTime.Now.Hour > 0 && DateTime.Now.Hour < 3)
-                // {
-                //     string check = function.ReadInstance("/StoreApply/" + DateTime.Now.ToString("yyyyMM") + ".txt");
-                //     if(string.IsNullOrEmpty(check))
-                //     {
-                //         function.WritePage("/StoreApply/", DateTime.Now.ToString("yyyyMM") + ".txt", DateTime.Now.ToString());
+                if(DateTime.Now.Day == 1 && DateTime.Now.Hour > 0 && DateTime.Now.Hour < 3)
+                {
+                    string check = function.ReadInstance("/StoreApply/" + DateTime.Now.ToString("yyyyMM") + ".txt");
+                    if(string.IsNullOrEmpty(check))
+                    {
+                        function.WritePage("/StoreApply/", DateTime.Now.ToString("yyyyMM") + ".txt", DateTime.Now.ToString());
                         DoSomething(db);
-                //     }
-                // }
+                    }
+                }
             }
             catch (Exception ex)
             {