lcl 3 сар өмнө
parent
commit
0310c2e0c5

+ 4 - 0
AppStart/Redis/RedisDbconn.cs

@@ -14,6 +14,10 @@ namespace MySystem
         public static CSRedis.CSRedisClient csredis;
         private RedisDbconn()
         {
+            if (csredis == null)
+            {
+                csredis = new CSRedis.CSRedisClient(ConfigurationManager.AppSettings["RedisConnStr"].ToString());
+            }
         }
 
         #region 设置单个字段

+ 2 - 2
Areas/Api/Controllers/v1/MainServer/MerchantQrCodeController.cs

@@ -189,7 +189,7 @@ namespace MySystem.Areas.Api.Controllers.v1
                 fields.Add("OpId", 1);
                 new PosMachinesTwoService().Edit(fields, pos.Id);
                 //推送绑定数据到java
-                PosPushDataNewHelper.Bind(addMer, pos);
+                // PosPushDataNewHelper.Bind(addMer, pos);
             }
             else if (SnNo != MachineNo && !string.IsNullOrEmpty(MachineNo))
             {
@@ -198,7 +198,7 @@ namespace MySystem.Areas.Api.Controllers.v1
                 fields.Add("DeviceKind", "1");
                 new PosMachinesService().Edit(fields, machines.Id);
                 //推送绑定数据到java
-                PosPushDataNewHelper.Bind(addMer, pos);
+                // PosPushDataNewHelper.Bind(addMer, pos);
             }
             if (SnNo == MachineNo || string.IsNullOrEmpty(MachineNo))
             {

+ 0 - 2
Startup.cs

@@ -103,8 +103,6 @@ namespace MySystem
 
             MySystemLib.SystemPublicFuction.appcheck = "success";
 
-            RedisDbconn.csredis = new CSRedis.CSRedisClient(Configuration["Setting:RedisConnStr"]);
-            KxsRedisDbconn.csredis = new CSRedis.CSRedisClient(Configuration["Setting:KxsRedisConnStr"]);
         }
 
         // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.