Browse Source

盒易付非首台,如果是乐刷和海科,也可以获得50奖励

lichunlei 1 year ago
parent
commit
d845c500e0
1 changed files with 26 additions and 2 deletions
  1. 26 2
      AppStart/Helper/StatService.cs

+ 26 - 2
AppStart/Helper/StatService.cs

@@ -397,9 +397,33 @@ namespace MySystem
                         {
                         {
                             TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
                             TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
                         }
                         }
-                        if(pos.IsFirst == 1 && pos.CreditTrade >= 5000) //首台无押金机返50
+                        if(pos.CreditTrade >= 5000) //首台无押金机返50
                         {
                         {
-                            doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
+                            if(pos.IsFirst == 1)
+                            {
+                                doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
+                            }
+                            else
+                            {
+                                string IdCard = merchant.MerIdcardNo;
+                                string IdCardStart = IdCard.Substring(0, 6);
+                                string IdCardEnd = IdCard.Substring(IdCard.Length - 4);
+                                string MerName = merchant.MerchantName;
+                                List<int> BrandIds = new List<int>();
+                                BrandIds.Add(4);
+                                BrandIds.Add(5);
+                                BrandIds.Add(8);
+                                BrandIds.Add(9);
+                                PosMerchantInfo other = db.PosMerchantInfo.FirstOrDefault(m => m.MerIdcardNo.StartsWith(IdCardStart) && m.MerIdcardNo.EndsWith(IdCardEnd) && m.MerchantName.Contains(MerName) && BrandIds.Contains(m.BrandId));
+                                if(other != null)
+                                {
+                                    PosMachinesTwo checkpos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == other.KqSnNo && m.IsFirst == 1);
+                                    if(checkpos != null)
+                                    {
+                                        doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
+                                    }
+                                }
+                            }
                         }
                         }
                     }
                     }
                 }
                 }