Browse Source

Merge branch 'feat-lcl-修复问题' of kxs-end/main-server into release-mainserver

lichunlei 1 year ago
parent
commit
f7e3c33e3b
2 changed files with 5 additions and 3 deletions
  1. 3 2
      AppStart/Helper/StatService.cs
  2. 2 1
      Util/Utils.cs

+ 3 - 2
AppStart/Helper/StatService.cs

@@ -181,6 +181,7 @@ namespace MySystem
         {
             WebCMSEntities db = new WebCMSEntities();
             DateTime yesterday = DateTime.Now.AddDays(-30);
+            DateTime today = DateTime.Now.AddMinutes(-5);
             IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && m.BrandId == 14 && m.CardType > 0 && m.Detail != "1");
             if (posid > 0)
             {
@@ -188,7 +189,7 @@ namespace MySystem
             }
             else
             {
-                posList = posList.Where(m => m.ActivationTime >= yesterday);
+                posList = posList.Where(m => m.ActivationTime >= yesterday && m.ActivationTime < today);
             }
             foreach (PosMachinesTwo pos in posList.ToList())
             {
@@ -447,7 +448,7 @@ namespace MySystem
         public void activePrizeWithoutDeposit(int posid = 0)
         {
             WebCMSEntities db = new WebCMSEntities();
-            DateTime yesterday = DateTime.Now.AddDays(-10);
+            DateTime yesterday = DateTime.Now.AddDays(-31);
             DateTime today = DateTime.Now.AddMinutes(-10);
             IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && (string.IsNullOrEmpty(m.SeoKeyword) || m.SeoKeyword == "0") && m.CreditTrade >= 5000 && m.BrandId != 12 && m.BrandId != 13 && m.BrandId != 14 && m.BrandId != 15 && m.BrandId != 16 && m.Detail != "1");
             if (posid > 0)

+ 2 - 1
Util/Utils.cs

@@ -221,7 +221,7 @@ namespace MySystem
         #region 运营中心额度变更
         public void OperateAmountChange(OpModels.WebCMSEntities db, OpAmountItem param)
         {
-            if(param.UseAmount <= 0) return;
+            if(param.UseAmount <= 0 || param.UserId <= 0) return;
             function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(param), "运营中心额度变更测试");
             OpModels.UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == param.UserId);
             if (account == null)
@@ -257,6 +257,7 @@ namespace MySystem
                     }
                 }
             }
+            if(account.TotalAmt < 0) return;
             function.WriteLog("1", "运营中心额度变更测试");
             decimal AfterAmount = account.ValidForGetAmount + account.TotalAmt + account.ValidAmount;
             OpModels.AmountRecordNew add = db.AmountRecordNew.Add(new OpModels.AmountRecordNew()