Ver código fonte

推荐奖励不限制条件,每单都有

lichunlei 4 anos atrás
pai
commit
9b5790a5c3
1 arquivos alterados com 22 adições e 22 exclusões
  1. 22 22
      AppStart/Helper/AlipayPayBack2Service.cs

+ 22 - 22
AppStart/Helper/AlipayPayBack2Service.cs

@@ -267,9 +267,9 @@ namespace MySystem
                                     return;
                                 }
                                 int ParentUserId = user.ParentUserId;
-                                List<int> proids = new List<int>();
-                                proids.Add(10);
-                                proids.Add(11);
+                                // List<int> proids = new List<int>();
+                                // proids.Add(10);
+                                // proids.Add(11);
                                 while(ParentUserId > 0)
                                 {
                                     Users puser = db.Users.FirstOrDefault(m => m.Id == ParentUserId) ?? new Users();
@@ -281,28 +281,28 @@ namespace MySystem
                                     function.WriteLog("ActiveCount:" + ActiveCount, "推荐下单奖励监控日志");
                                     if ((machineCount + ActiveCount + couponCount >= 3 || puser.LeaderLevel > 0) && !directPrize)
                                     {
-                                        function.WriteLog("满足条件", "推荐下单奖励监控日志");
-                                        if(puser.LeaderLevel == 0) // 非盟主直推奖励,每个创客第一次下单,上级可得
-                                        {
-                                            List<int> oids = new List<int>();
-                                            var orderpros = db.OrderProduct.Select(m => new { m.OrderId,m.UserId,m.ProductId }).Where(m => m.UserId == order.UserId && proids.Contains(m.ProductId)).ToList();
-                                            foreach(var orderpro in orderpros)
-                                            {
-                                                oids.Add(orderpro.OrderId);
-                                            }
-                                            bool check = db.Orders.Any(m => oids.Contains(m.Id) && m.Status > 0);
-                                            if(!check)
-                                            {
-                                                DirectPrize(db, order.Id, ParentUserId, pro.ProductCount);
-                                                directPrize = true;
-                                            }
-                                        }
-                                        else
-                                        {
+                                        // function.WriteLog("满足条件", "推荐下单奖励监控日志");
+                                        // if(puser.LeaderLevel == 0) // 非盟主直推奖励,每个创客第一次下单,上级可得
+                                        // {
+                                        //     List<int> oids = new List<int>();
+                                        //     var orderpros = db.OrderProduct.Select(m => new { m.OrderId,m.UserId,m.ProductId }).Where(m => m.UserId == order.UserId && proids.Contains(m.ProductId)).ToList();
+                                        //     foreach(var orderpro in orderpros)
+                                        //     {
+                                        //         oids.Add(orderpro.OrderId);
+                                        //     }
+                                        //     bool check = db.Orders.Any(m => oids.Contains(m.Id) && m.Status > 0);
+                                        //     if(!check)
+                                        //     {
+                                        //         DirectPrize(db, order.Id, ParentUserId, pro.ProductCount);
+                                        //         directPrize = true;
+                                        //     }
+                                        // }
+                                        // else
+                                        // {
                                             // 盟主直推奖励,可以每次下单获得
                                             DirectPrize(db, order.Id, ParentUserId, pro.ProductCount);
                                             directPrize = true;
-                                        }
+                                        // }
 
                                         //推荐下单上级获得30天的机具循环天数
                                         var posList = db.PosMachinesTwo.Select(m => new { m.Id, m.UserId, m.BindingState, m.RecycEndDate }).Where(m => m.UserId == ParentUserId && m.BindingState == 0 && m.RecycEndDate != null).ToList();