Forráskód Böngészése

开机奖励日志,排除注销创客

lichunlei 2 éve
szülő
commit
321ce0c91b
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      AppStart/Helper/StatService.cs

+ 3 - 2
AppStart/Helper/StatService.cs

@@ -881,12 +881,13 @@ namespace MySystem
                 {
                     try
                     {
+                        function.WriteLog("\n\n" + DateTime.Now.ToString() + "\nposid:" + content, "开机奖励发放日志");
                         int PosId = int.Parse(content);
                         WebCMSEntities db = new WebCMSEntities();
                         List<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.Id == PosId && m.ActivationState == 1 && !string.IsNullOrEmpty(m.SeoKeyword) && m.SeoKeyword != "0" && m.CreditTrade >= 1000).ToList();
                         foreach (PosMachinesTwo pos in posList)
                         {
-                            function.WriteLog("\n\n" + DateTime.Now.ToString() + "\nsn:" + pos.PosSn, "开机奖励发放日志");
+                            function.WriteLog("sn:" + pos.PosSn, "开机奖励发放日志");
                             if (pos.BindingTime > DateTime.Now.AddDays(-30))
                             {
                                 decimal ActPrize = decimal.Parse(function.CheckNum(pos.SeoKeyword));
@@ -908,7 +909,7 @@ namespace MySystem
                                                 for (int i = ParentNavs.Length - 1; i >= 0; i--)
                                                 {
                                                     int UserId = int.Parse(ParentNavs[i]);
-                                                    Users puser = db.Users.FirstOrDefault(m => m.Id == UserId && m.AuthFlag == 1);
+                                                    Users puser = db.Users.FirstOrDefault(m => m.Id == UserId && m.AuthFlag == 1 && m.Status > -1);
                                                     if (puser != null && Prize > 0)
                                                     {
                                                         function.WriteLog("上级:" + puser.MakerCode, "开机奖励发放日志");