lcl 2 months ago
parent
commit
d9eded45a5
3 changed files with 40 additions and 41 deletions
  1. 6 8
      Controllers/HomeController.cs
  2. 33 33
      Startup.cs
  3. 1 0
      appsettings.json

+ 6 - 8
Controllers/HomeController.cs

@@ -138,16 +138,14 @@ namespace MySystem.Controllers
         {
             DateTime start = DateTime.Parse("2025-01-01 00:00:00");
             List<string> list = new List<string>();
-            list.Add("");
             WebCMSEntities db = new WebCMSEntities();
-            foreach(string sub in list)
+            // var orders = db.ConsumerOrders.Where(m => list.Contains(m.OrderNo) && m.Status > 0).ToList();
+            DateTime end = DateTime.Parse("2025-01-15 00:00:00");
+            var orders = db.ConsumerOrders.Where(m => m.CreateDate >= start && m.CreateDate < end && m.Status > 0).ToList();
+            foreach(var order in orders)
             {
-                var orders = db.ConsumerOrders.Where(m => m.SnNo == sub && m.Status > 0 && m.CreateDate >= start).ToList();
-                foreach(var order in orders)
-                {
-                    MerchantAddInfo addMer = db.MerchantAddInfo.FirstOrDefault(m => m.Id == order.MerchantId) ?? new MerchantAddInfo();
-                    PosPushDataNewHelper.Trade(order, addMer);
-                }
+                MerchantAddInfo addMer = db.MerchantAddInfo.FirstOrDefault(m => m.Id == order.MerchantId) ?? new MerchantAddInfo();
+                PosPushDataNewHelper.Trade(order, addMer);
             }
             db.Dispose();
             return "ok";

+ 33 - 33
Startup.cs

@@ -139,11 +139,11 @@ namespace MySystem
             // };
             // app.UseStatusCodePages(builder => builder.Run(handler));
             app.UseStaticFiles();
-            app.UseStaticFiles(new StaticFileOptions
-            {
-                FileProvider = new PhysicalFileProvider(AppContext.BaseDirectory + "/static"),
-                RequestPath = "/static"
-            });
+            // app.UseStaticFiles(new StaticFileOptions
+            // {
+            //     FileProvider = new PhysicalFileProvider(AppContext.BaseDirectory + "/static"),
+            //     RequestPath = "/static"
+            // });
             // app.UseStaticFiles(new StaticFileOptions
             // {
             //     FileProvider = new PhysicalFileProvider(AppContext.BaseDirectory + "/" + Configuration["Setting:Database"]),
@@ -190,36 +190,36 @@ namespace MySystem
             }
             if(Library.ConfigurationManager.EnvironmentFlag == 2)
             {
-                GetTencentAddressInfoService.Instance.Start(); // 获取腾讯地图地址
-                UpdateSignUrlService.Instance.Start(); //更新签约码
-                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(); //微信返现队列
-                ProfitHelper.Instance.StartSetDivi(); //设置订单当前返现金额
-                ProfitShareService.Instance.Start(); //分账状态监控队列,分账完成则提交返现(微信)
-                AlipayShareService.Instance.Start(); //分账状态监控队列,分账完成则提交返现(支付宝)
-                WeChatPayBackService.Instance.StartDivi(); //补分账
-                AlipayPayBackService.Instance.StartDivi(); //补分账
-                // ProfitHelper.Instance.StartListenProfit(); //每月分润
-                ProfitBeforeHelper.Instance.StartListenProfit(); //每月分润
-                ProfitAfterHelper.Instance.StartListenProfit(); //每月分润
+                // GetTencentAddressInfoService.Instance.Start(); // 获取腾讯地图地址
+                // UpdateSignUrlService.Instance.Start(); //更新签约码
+                // 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(); //微信返现队列
+                // ProfitHelper.Instance.StartSetDivi(); //设置订单当前返现金额
+                // ProfitShareService.Instance.Start(); //分账状态监控队列,分账完成则提交返现(微信)
+                // AlipayShareService.Instance.Start(); //分账状态监控队列,分账完成则提交返现(支付宝)
+                // WeChatPayBackService.Instance.StartDivi(); //补分账
+                // AlipayPayBackService.Instance.StartDivi(); //补分账
+                // // ProfitHelper.Instance.StartListenProfit(); //每月分润
+                // ProfitBeforeHelper.Instance.StartListenProfit(); //每月分润
+                // ProfitAfterHelper.Instance.StartListenProfit(); //每月分润
 
-                AlipayPayBackFeeService.Instance.Start();
-                ActiveRewardService.Instance.StartAct();
-                ActiveRewardService.Instance.StartOpenReward();
-                ActiveRewardService.Instance.StartLeaderReward();
-                ActiveRewardService.Instance.StartOperateReward();
+                // AlipayPayBackFeeService.Instance.Start();
+                // ActiveRewardService.Instance.StartAct();
+                // ActiveRewardService.Instance.StartOpenReward();
+                // ActiveRewardService.Instance.StartLeaderReward();
+                // ActiveRewardService.Instance.StartOperateReward();
 
-                MerchantStandardService.Instance.Start(); //商户缴纳服务费次月活动交易额大于等于1W,奖励进件创客50元
-                MerchantStandardService.Instance.StartThree(); //商户缴纳服务费次月起连续不间断三个月,每月活动交易额大于1W,奖励进件创客100元
-                MerchantStandardService.Instance.StartActive();
+                // MerchantStandardService.Instance.Start(); //商户缴纳服务费次月活动交易额大于等于1W,奖励进件创客50元
+                // MerchantStandardService.Instance.StartThree(); //商户缴纳服务费次月起连续不间断三个月,每月活动交易额大于1W,奖励进件创客100元
+                // MerchantStandardService.Instance.StartActive();
             }
             // HaoDaExtHelper.Instance.StartWeChat();
             // HaoDaExtHelper.Instance.StartAlipay();

+ 1 - 0
appsettings.json

@@ -24,6 +24,7 @@
     "KxsSqlConnStr": "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsProfitServer;charset=utf8;",
     "KxsStatSqlConnStr": "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsStatServer;charset=utf8;",
     "RedisConnStr": "8.137.99.48:6379,password=kxsmp@2023,DefaultDatabase=0,poolsize=500,preheat=50,asyncPipeline=true",
+    "KxsRedisConnStr": "r-2vc7uglenfmzmlvrnopd.redis.cn-chengdu.rds.aliyuncs.com:6379,password=AZp2ns01w07YW9K0,DefaultDatabase=0,poolsize=500,preheat=50,asyncPipeline=true",
     "IOSAppVersion": "1.0.0",
     "AndroidAppVersion": "1.0.0",
     "OSSKey": "",