Browse Source

清除返现队列指定订单

lcl 1 year ago
parent
commit
9ce03a2351
2 changed files with 24 additions and 0 deletions
  1. 17 0
      Controllers/HomeController.cs
  2. 7 0
      Util/RedisDbconn.cs

+ 17 - 0
Controllers/HomeController.cs

@@ -214,5 +214,22 @@ namespace MySystem.Controllers
 
             return "ok";
         }
+    
+        
+        public string clearQueue(int OrderId, int MerchantId, int PayMode)
+        {
+            List<ConsumerOrders> list = RedisDbconn.Instance.GetList<ConsumerOrders>("ConsumerOrdersHd:Divi:" + PayMode + ":" + MerchantId + "", 1, 100000);
+            foreach(ConsumerOrders sub in list)
+            {
+                if(sub.Id == OrderId)
+                {
+                    RedisDbconn.Instance.DelFromList("ConsumerOrdersHd:Divi:2:1272", sub);
+                }
+            }
+            return "ok";
+        }
+    
+    
+    
     }
 }

+ 7 - 0
Util/RedisDbconn.cs

@@ -148,6 +148,13 @@ namespace MySystem
         }
         #endregion
 
+        #region 移除列表对象
+        public long DelFromList(string key, object value, int count = 1)
+        {
+            return RedisHelper.LRem(key, count, value);
+        }
+        #endregion
+
         #region 添加排序列表对象
         public long AddSort(string key, object value, decimal score)
         {