Browse Source

关闭了商户型创客自动匹配程序
修复了机具循环问题

lichunlei 4 years ago
parent
commit
39ae5c7102

+ 3 - 3
AppStart/Helper/Profit/ProfitHelper.cs

@@ -1772,7 +1772,7 @@ namespace MySystem
             }
             function.WritePage("/ProfitStat/", Month + ".txt", DateTime.Now.ToString());
             WebCMSEntities db = new WebCMSEntities();
-            for (int i = 1; i <= 5; i++) //品牌
+            for (int i = 1; i <= 6; i++) //品牌
             {
                 for (int j = 0; j <= 1; j++) //卡类型
                 {
@@ -2101,11 +2101,11 @@ namespace MySystem
                 DataTable dt = new DataTable();
                 if (BankCardType == 1)
                 {
-                    dt = dbconn.dtable("select SnNo,QrPayFlag,sum(TradeAmount) from TradeRecord where CreateDate>='" + start + "' and CreateDate<'" + end + "' and BankCardType>=1 and BankCardType<=2 and BrandId=" + BrandId + " and UserId=55244 group by SnNo,QrPayFlag");
+                    dt = dbconn.dtable("select SnNo,QrPayFlag,sum(TradeAmount) from TradeRecord where CreateDate>='" + start + "' and CreateDate<'" + end + "' and BankCardType>=1 and BankCardType<=2 and BrandId=" + BrandId + " group by SnNo,QrPayFlag");
                 }
                 if (BankCardType == 0)
                 {
-                    dt = dbconn.dtable("select SnNo,QrPayFlag,TradeAmount from TradeRecord where CreateDate>='" + start + "' and CreateDate<'" + end + "' and BankCardType=0 and BrandId=" + BrandId + " and UserId=55244");
+                    dt = dbconn.dtable("select SnNo,QrPayFlag,TradeAmount from TradeRecord where CreateDate>='" + start + "' and CreateDate<'" + end + "' and BankCardType=0 and BrandId=" + BrandId + "");
                 }
                 foreach (DataRow dr in dt.Rows)
                 {

+ 3 - 4
AppStart/Helper/StatService.cs

@@ -25,8 +25,8 @@ namespace MySystem
                 if (string.IsNullOrEmpty(flag))
                 {
                     function.WritePage("/Stat/", doDate + ".txt", DateTime.Now.ToString("HH:mm:ss"));
-                    dosomething1(doDate);
-                    dosomething11(doDate);
+                    // dosomething1(doDate);
+                    // dosomething11(doDate);
                     // dosomething2(doDate);
                     StartEverDay(doDate);
                     dosomething4(doDate);
@@ -1299,7 +1299,7 @@ namespace MySystem
                                         teamStat.NonDirectTradeAmt += TradeAmount;
                                     }
                                     db.SaveChanges();
-                                    OtherMySqlConn.op("update Users set ThisMonthTrade=ThisMonthTrade+"+TradeAmount+" where Id=" + UserId);
+                                    OtherMySqlConn.op("update Users set ThisMonthTrade=ThisMonthTrade+"+TradeAmount+" where Id=" + NavUserId);
                                 }
                                 // RedisDbconn.Instance.Clear("TeamTotalAmount:" + NavUserId);
                                 // RedisDbconn.Instance.Clear("TeamTotalAmount:" + NavUserId + ":" + TradeMonth);
@@ -1325,7 +1325,6 @@ namespace MySystem
             StatMerchantTrade(date);
         }
 
-
         public void StatTradeAmountEverDay2(object sender)
         {
             string date = sender.ToString();

+ 1 - 1
AppStart/Helper/SycnSpServer/SycnSpActiveService.cs

@@ -57,7 +57,7 @@ namespace MySystem
                                 if (pos.BrandId == 2 || pos.BrandId == 4 || pos.BrandId == 5 || pos.BrandId == 6 || pos.BrandId == 7)
                                 {
                                     pos.SeoKeyword = act.SeoTitle;
-                                    pos.IsPurchase = 0;
+                                    // pos.IsPurchase = 0;
                                     db.SaveChanges();
                                     RedisDbconn.Instance.Set("PosMachinesTwo:" + pos.Id, pos);
                                     RedisDbconn.Instance.Set("PosMachinesTwo:" + pos.PosSn, pos);

+ 20 - 20
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -48,7 +48,7 @@ namespace MySystem
                                     if (trade.SerEntryMode == "N" && trade.ProductType == "1")
                                     {
                                         pos.SeoKeyword = trade.TradeAmount.ToString("f2");
-                                        pos.IsPurchase = 0;
+                                        // pos.IsPurchase = 0;
                                         db.SaveChanges();
                                     }
                                 }
@@ -203,25 +203,25 @@ namespace MySystem
                                         {
                                             pos.DebitCardTrade += TradeAmount;
                                         }
-                                        if (pos.CreditTrade < CheckMoney)
+                                        // if (pos.CreditTrade < CheckMoney)
+                                        // {
+                                        //     decimal deposit = decimal.Parse(function.CheckNum(pos.SeoKeyword));
+                                        //     if (deposit > 0 && pos.IsPurchase != 1)
+                                        //     {
+                                        //         pos.IsPurchase = 0;
+                                        //     }
+                                        //     else
+                                        //     {
+                                        //         pos.IsPurchase = 99;
+                                        //     }
+                                        // }
+                                        if (pos.CreditTrade >= CheckMoney && pos.ActivationState == 0 && pos.TransferTime < pos.BindingTime && pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
                                         {
-                                            decimal deposit = decimal.Parse(function.CheckNum(pos.SeoKeyword));
-                                            if (deposit > 0 && pos.IsPurchase != 1)
-                                            {
-                                                pos.IsPurchase = 0;
-                                            }
-                                            else
-                                            {
-                                                pos.IsPurchase = 99;
-                                            }
-                                        }
-                                        else if (pos.CreditTrade >= CheckMoney && pos.ActivationState == 0 && pos.TransferTime < pos.BindingTime && pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
-                                        {
-                                            decimal deposit = decimal.Parse(function.CheckNum(pos.SeoKeyword));
-                                            if (deposit == 0 && pos.IsPurchase != 1)
-                                            {
-                                                pos.IsPurchase = 0;
-                                            }
+                                            // decimal deposit = decimal.Parse(function.CheckNum(pos.SeoKeyword));
+                                            // if (deposit == 0 && pos.IsPurchase != 1)
+                                            // {
+                                            //     pos.IsPurchase = 0;
+                                            // }
                                             pos.ActivationState = 1;
                                             pos.ActivationTime = DateTime.Now;
                                             PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
@@ -234,7 +234,7 @@ namespace MySystem
                                             }
                                         }
                                         // 立刷60天内刷满10000,再返40
-                                        if (pos.BrandId == 6 && pos.CreditTrade >= 10000 && pos.BindingTime > DateTime.Now.AddDays(-60))
+                                        if (pos.BrandId == 6 && pos.ActivationState == 1 && pos.CreditTrade >= 10000 && pos.BindingTime > DateTime.Now.AddDays(-60))
                                         {
                                             PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId) ?? new PxcModels.PosMerchantInfo();
                                             PxcModels.Users getUser = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new PxcModels.Users();

+ 1 - 1
Controllers/HomeController.cs

@@ -388,7 +388,7 @@ namespace MySystem.Controllers
                                 }
                                 else if (pos.CreditTrade >= 1000 && pos.ActivationState == 0 && pos.BindingTime > DateTime.Now.AddDays(-20))
                                 {
-                                    pos.IsPurchase = 0;
+                                    // pos.IsPurchase = 0;
                                     pos.ActivationState = 1;
                                     pos.ActivationTime = DateTime.Now;
                                     PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);

+ 1 - 2
Startup.cs

@@ -216,7 +216,6 @@ namespace MySystem
 
             // app.UseMiddleware<GraphQLMiddleware>();
 
-
             // TradeStatTimer2.Instance.Start(); //交易统计
 
             //必须打开的
@@ -235,7 +234,7 @@ namespace MySystem
 
             // StatService.Instance.StatUserLevel();
             // StatService.Instance.StartEverDay("2022-05-11");
-            // ProfitHelper.Instance.StatProfit("202204"); //统计分润
+            // ProfitHelper.Instance.StatProfit("202205"); //统计分润
             // StatService.Instance.ListenFluxRecord();
             // StatService.Instance.StartEverDay2();
             // TestHelper.Instance.Start();