Jelajahi Sumber

开启每月分润

lichunlei 1 tahun lalu
induk
melakukan
5d927a60f4
2 mengubah file dengan 27 tambahan dan 30 penghapusan
  1. 11 11
      AppStart/Helper/Profit/ProfitHelper.cs
  2. 16 19
      Startup.cs

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

@@ -332,18 +332,18 @@ namespace MySystem
 
         public void StartListenProfitDo()
         {
-            // while(true)
-            // {
-            //     if(DateTime.Now.Day == 1 && DateTime.Now.Hour > 2 && DateTime.Now.Hour < 5)
-            //     {
+            while(true)
+            {
+                if(DateTime.Now.Day < 10 && DateTime.Now.Hour > 2 && DateTime.Now.Hour < 5)
+                {
                     DoProfit();
-            //         Thread.Sleep(600000);
-            //     }
-            //     else
-            //     {
-            //         Thread.Sleep(3600000);
-            //     }
-            // }
+                    Thread.Sleep(600000);
+                }
+                else
+                {
+                    Thread.Sleep(3600000);
+                }
+            }
         }
 
         //分润算法

+ 16 - 19
Startup.cs

@@ -170,25 +170,22 @@ namespace MySystem
             });
 
             //必须打开的
-            // if(Library.ConfigurationManager.EnvironmentFlag == 2)
-            // {
-            //     MerchantConfirmService.Instance.Start(); //特约商户进件队列
-            //     CheckAlipaySignService.Instance.Start(); //特约商户签约队列(支付宝)
-            //     CheckWeChatSignService.Instance.Start(); //特约商户签约队列(微信)
-            //     AlipayPayBackService.Instance.Start(); //支付宝支付回调队列
-            //     AlipayPayBackService.Instance.StartProfitShare(); //监听已支付订单,超过1分钟的订单执行分账
-            //     WeChatPayBackService.Instance.Start(); //微信支付回调队列
-            //     WeChatPayBackService.Instance.StartProfitShare(); //监听已支付订单,超过1分钟的订单执行分账
-            //     ProfitHelper.Instance.StartActive(); //发放达标奖励队列
-            //     ProfitHelper.Instance.StartListenTrade(); //支付宝返现队列
-            //     ProfitHelper.Instance.StartListenWxTrade(); //微信返现队列
-            //     ProfitShareService.Instance.Start(); //分账状态监控队列,分账完成则提交返现(微信)
-            //     AlipayShareService.Instance.Start(); //分账状态监控队列,分账完成则提交返现(支付宝)
-            // }
-            // else
-            // {
-            //     ProfitHelper.Instance.StartListenProfit();
-            // }
+            if(Library.ConfigurationManager.EnvironmentFlag == 2)
+            {
+                MerchantConfirmService.Instance.Start(); //特约商户进件队列
+                CheckAlipaySignService.Instance.Start(); //特约商户签约队列(支付宝)
+                CheckWeChatSignService.Instance.Start(); //特约商户签约队列(微信)
+                AlipayPayBackService.Instance.Start(); //支付宝支付回调队列
+                AlipayPayBackService.Instance.StartProfitShare(); //监听已支付订单,超过1分钟的订单执行分账
+                WeChatPayBackService.Instance.Start(); //微信支付回调队列
+                WeChatPayBackService.Instance.StartProfitShare(); //监听已支付订单,超过1分钟的订单执行分账
+                ProfitHelper.Instance.StartActive(); //发放达标奖励队列
+                ProfitHelper.Instance.StartListenTrade(); //支付宝返现队列
+                ProfitHelper.Instance.StartListenWxTrade(); //微信返现队列
+                ProfitShareService.Instance.Start(); //分账状态监控队列,分账完成则提交返现(微信)
+                AlipayShareService.Instance.Start(); //分账状态监控队列,分账完成则提交返现(支付宝)
+                ProfitHelper.Instance.StartListenProfit(); //每月分润
+            }
             // HaoDaExtHelper.Instance.StartWeChat();
             // HaoDaExtHelper.Instance.StartAlipay();
             // HaoDaExtQueryHelper.Instance.StartWeChat();