Sfoglia il codice sorgente

Merge branch 'feature-dgy-指定订单添加或退出返现' into DuGuYang

DuGuYang 1 anno fa
parent
commit
0716b25ffb

+ 23 - 11
Areas/Api/Controllers/Main/ConsumerOrdersController.cs

@@ -205,17 +205,20 @@ namespace MySystem.Areas.Api.Controllers.v1
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             int Id = int.Parse(function.CheckInt(data["id"].ToString()));
             ConsumerOrders order = maindb.ConsumerOrders.FirstOrDefault(m => m.Id == Id);
-            if(order != null)
+            if (order != null)
             {
-                List<ConsumerOrders> suborders = RedisDbconn.Instance.GetList<ConsumerOrders>("ConsumerOrders:Divi:" + order.PayMode + ":" + order.MerchantId);
-                if(suborders.Count > 0)
+                List<ConsumerOrders> suborders = RedisDbconn.Instance.GetList<ConsumerOrders>("ConsumerOrdersHd:Divi:" + order.PayMode + ":" + order.MerchantId);
+                if (suborders.Count > 0)
                 {
                     ConsumerOrders suborder = suborders.FirstOrDefault(m => m.Id == Id);
-                    if(suborder != null)
+                    if (suborder != null)
                     {
                         order.CurDivi = suborder.CurDivi;
                         maindb.SaveChanges();
-                        RedisDbconn.Instance.RemoveFromList("ConsumerOrders:Divi:" + order.PayMode + ":" + order.MerchantId, suborder);
+                        RedisDbconn.Instance.RemoveFromList("ConsumerOrdersHd:Divi:" + order.PayMode + ":" + order.MerchantId, suborder);
+                        function.WriteLog(DateTime.Now.ToString() + "\r\n" + "订单Id:" + suborder.Id + "\r\n\r\n", "银联订单取消返现");
+                        order.ReturnFlag = 0;
+                        maindb.SaveChanges();
                         return new AppResultJson() { Status = "1", Info = "", Data = Obj };
                     }
                 }
@@ -233,21 +236,30 @@ namespace MySystem.Areas.Api.Controllers.v1
             AppResultJson result = RestoreDiviDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
         }
-        private AppResultJson RestoreDiviDo(string value)
+        public AppResultJson RestoreDiviDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             int Id = int.Parse(function.CheckInt(data["id"].ToString()));
             ConsumerOrders order = maindb.ConsumerOrders.FirstOrDefault(m => m.Id == Id);
-            if(order != null)
+            if (order != null)
             {
-                List<ConsumerOrders> suborders = RedisDbconn.Instance.GetList<ConsumerOrders>("ConsumerOrders:Divi:" + order.PayMode + ":" + order.MerchantId);
-                if(suborders.Count > 0)
+                JsonData ProfitInfo = JsonMapper.ToObject(order.SeoDescription);
+                int ProfitDays = int.Parse(function.CheckInt(ProfitInfo["ProfitDays"].ToString())); //活动有效时间
+                if (order.IsAct == 0) return new AppResultJson() { Status = "-1", Info = "恢复失败,非活动订单不能进行该操作", Data = Obj };
+                if (DateTime.Parse(order.UpdateDate.ToString()).AddMinutes(10) >= DateTime.Now) return new AppResultJson() { Status = "-1", Info = "恢复失败,订单完成支付10分钟内不能进行该操作", Data = Obj };
+                if (order.MaxDivi == order.CurDivi) return new AppResultJson() { Status = "-1", Info = "恢复失败,订单已完成所有返现", Data = Obj };
+                if (DateTime.Parse(order.UpdateDate.ToString()).AddDays(ProfitDays) < DateTime.Now) return new AppResultJson() { Status = "-1", Info = "恢复失败,非活动订单不能进行该操作", Data = Obj };
+                List<ConsumerOrders> suborders = RedisDbconn.Instance.GetList<ConsumerOrders>("ConsumerOrdersHd:Divi:" + order.PayMode + ":" + order.MerchantId);
+                if (suborders.Count > 0)
                 {
                     ConsumerOrders suborder = suborders.FirstOrDefault(m => m.Id == Id);
-                    if(suborder == null)
+                    if (suborder == null)
                     {
-                        RedisDbconn.Instance.AddRightList("ConsumerOrders:Divi:" + order.PayMode + ":" + order.MerchantId, order);
+                        RedisDbconn.Instance.AddRightList("ConsumerOrdersHd:Divi:" + order.PayMode + ":" + order.MerchantId, order);
+                        function.WriteLog(DateTime.Now.ToString() + "\r\n" + "订单Id:" + Id + "\r\n\r\n", "银联订单恢复返现");
+                        order.ReturnFlag = 1;
+                        maindb.SaveChanges();
                     }
                     return new AppResultJson() { Status = "1", Info = "", Data = Obj };
                 }

+ 2 - 0
Models/Main/ConsumerOrders.cs

@@ -34,5 +34,7 @@ namespace MySystem.Models.Main
         public string DivideLog { get; set; }
         public string TradePayNo { get; set; }
         public int SetRecordId { get; set; }
+        public int SettleAmount { get; set; }
+        public ulong ReturnFlag { get; set; }
     }
 }

+ 8 - 1
Models/Main/MerchantInfo.cs

@@ -45,8 +45,15 @@ namespace MySystem.Models.Main
         public decimal AllocationAmount { get; set; }
         public decimal ActMaxAmount { get; set; }
         public decimal ActCurrentAmount { get; set; }
-        public int IsAct { get; set; }
         public int ExamineStatus { get; set; }
         public int Months { get; set; }
+        public int IsAct { get; set; }
+        public DateTime? EndTime { get; set; }
+        public DateTime? StartTime { get; set; }
+        public string BusinessHours { get; set; }
+        public string BriefIntroduction { get; set; }
+        public int Popularity { get; set; }
+        public decimal Latitude { get; set; }
+        public decimal Longitude { get; set; }
     }
 }

+ 41 - 0
Models/Main/WebCMSEntities.cs

@@ -2295,6 +2295,11 @@ namespace MySystem.Models.Main
 
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
+                entity.Property(e => e.ReturnFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'")
+                    .HasComment("返现队列标记");
+
                 entity.Property(e => e.ReturnMoney).HasColumnType("decimal(18,2)");
 
                 entity.Property(e => e.SeoDescription)
@@ -2316,6 +2321,10 @@ namespace MySystem.Models.Main
                     .HasColumnType("int(11)")
                     .HasComment("活动记录Id");
 
+                entity.Property(e => e.SettleAmount)
+                    .HasColumnType("int(11)")
+                    .HasComment("结算金额");
+
                 entity.Property(e => e.SnNo)
                     .HasColumnType("varchar(50)")
                     .HasCharSet("utf8")
@@ -6757,6 +6766,18 @@ namespace MySystem.Models.Main
 
                 entity.Property(e => e.BindStatus).HasColumnType("int(11)");
 
+                entity.Property(e => e.BriefIntroduction)
+                    .HasColumnType("longtext")
+                    .HasComment("简介")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BusinessHours)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("营业时间段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
 
                 entity.Property(e => e.CreateMan)
@@ -6764,6 +6785,10 @@ namespace MySystem.Models.Main
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.EndTime)
+                    .HasColumnType("datetime")
+                    .HasComment("营业结束时间");
+
                 entity.Property(e => e.ExamineStatus)
                     .HasColumnType("int(11)")
                     .HasComment("服务费考核状态");
@@ -6780,6 +6805,10 @@ namespace MySystem.Models.Main
 
                 entity.Property(e => e.LastConsumeDate).HasColumnType("datetime");
 
+                entity.Property(e => e.Latitude)
+                    .HasColumnType("decimal(18,8)")
+                    .HasComment("纬度");
+
                 entity.Property(e => e.LoginPwd)
                     .HasColumnType("varchar(32)")
                     .HasCharSet("utf8")
@@ -6790,6 +6819,10 @@ namespace MySystem.Models.Main
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.Longitude)
+                    .HasColumnType("decimal(18,8)")
+                    .HasComment("经度");
+
                 entity.Property(e => e.Mobile)
                     .HasColumnType("varchar(11)")
                     .HasCharSet("utf8")
@@ -6809,6 +6842,10 @@ namespace MySystem.Models.Main
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.Popularity)
+                    .HasColumnType("int(11)")
+                    .HasComment("人气值");
+
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
                 entity.Property(e => e.SeoDescription)
@@ -6832,6 +6869,10 @@ namespace MySystem.Models.Main
 
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.StartTime)
+                    .HasColumnType("datetime")
+                    .HasComment("营业开始时间");
+
                 entity.Property(e => e.Status).HasColumnType("int(11)");
 
                 entity.Property(e => e.TotalActActual).HasColumnType("decimal(18,2)");

+ 3 - 2
Models/Main1/ConsumerOrders.cs

@@ -30,9 +30,10 @@ namespace MySystem.Models.Main1
         public int UserId { get; set; }
         public decimal MerchantActualAmount { get; set; }
         public string DivideLog { get; set; }
-        public int DivideFlag { get; set; }
-        public DateTime? DivideDate { get; set; }
         public string TradePayNo { get; set; }
         public int SetRecordId { get; set; }
+        public int DivideFlag { get; set; }
+        public DateTime? DivideDate { get; set; }
+        public ulong ReturnFlag { get; set; }
     }
 }

+ 7 - 0
Models/Main1/MerchantInfo.cs

@@ -48,5 +48,12 @@ namespace MySystem.Models.Main1
         public int IsAct { get; set; }
         public int ExamineStatus { get; set; }
         public int Months { get; set; }
+        public DateTime? EndTime { get; set; }
+        public DateTime? StartTime { get; set; }
+        public string BusinessHours { get; set; }
+        public string BriefIntroduction { get; set; }
+        public int Popularity { get; set; }
+        public decimal Latitude { get; set; }
+        public decimal Longitude { get; set; }
     }
 }

+ 23 - 0
Models/Main1/SysWithdrawalApplyRecord.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models.Main1
+{
+    public partial class SysWithdrawalApplyRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string AccountNo { get; set; }
+        public string ApplyNo { get; set; }
+    }
+}

+ 108 - 0
Models/Main1/WebCMSEntities.cs

@@ -217,6 +217,7 @@ namespace MySystem.Models.Main1
         public virtual DbSet<SysAdminRole> SysAdminRole { get; set; }
         public virtual DbSet<SysLog> SysLog { get; set; }
         public virtual DbSet<SysRechargeRecord> SysRechargeRecord { get; set; }
+        public virtual DbSet<SysWithdrawalApplyRecord> SysWithdrawalApplyRecord { get; set; }
         public virtual DbSet<SystemSet> SystemSet { get; set; }
         public virtual DbSet<TeamApply> TeamApply { get; set; }
         public virtual DbSet<TeamApplyForTeamName> TeamApplyForTeamName { get; set; }
@@ -2297,6 +2298,11 @@ namespace MySystem.Models.Main1
 
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
+                entity.Property(e => e.ReturnFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'")
+                    .HasComment("返现队列标记");
+
                 entity.Property(e => e.ReturnMoney).HasColumnType("decimal(18,2)");
 
                 entity.Property(e => e.SeoDescription)
@@ -6864,6 +6870,18 @@ namespace MySystem.Models.Main1
 
                 entity.Property(e => e.BindStatus).HasColumnType("int(11)");
 
+                entity.Property(e => e.BriefIntroduction)
+                    .HasColumnType("longtext")
+                    .HasComment("简介")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BusinessHours)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("营业时间段")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
 
                 entity.Property(e => e.CreateMan)
@@ -6871,6 +6889,10 @@ namespace MySystem.Models.Main1
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.EndTime)
+                    .HasColumnType("datetime")
+                    .HasComment("营业结束时间");
+
                 entity.Property(e => e.ExamineStatus)
                     .HasColumnType("int(11)")
                     .HasComment("服务费考核状态");
@@ -6887,6 +6909,10 @@ namespace MySystem.Models.Main1
 
                 entity.Property(e => e.LastConsumeDate).HasColumnType("datetime");
 
+                entity.Property(e => e.Latitude)
+                    .HasColumnType("decimal(18,8)")
+                    .HasComment("纬度");
+
                 entity.Property(e => e.LoginPwd)
                     .HasColumnType("varchar(32)")
                     .HasCharSet("utf8")
@@ -6897,6 +6923,10 @@ namespace MySystem.Models.Main1
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.Longitude)
+                    .HasColumnType("decimal(18,8)")
+                    .HasComment("经度");
+
                 entity.Property(e => e.Mobile)
                     .HasColumnType("varchar(11)")
                     .HasCharSet("utf8")
@@ -6916,6 +6946,10 @@ namespace MySystem.Models.Main1
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.Popularity)
+                    .HasColumnType("int(11)")
+                    .HasComment("人气值");
+
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
                 entity.Property(e => e.SeoDescription)
@@ -6939,6 +6973,10 @@ namespace MySystem.Models.Main1
 
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.StartTime)
+                    .HasColumnType("datetime")
+                    .HasComment("营业开始时间");
+
                 entity.Property(e => e.Status).HasColumnType("int(11)");
 
                 entity.Property(e => e.TotalActActual).HasColumnType("decimal(18,2)");
@@ -15080,6 +15118,76 @@ namespace MySystem.Models.Main1
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<SysWithdrawalApplyRecord>(entity =>
+            {
+                entity.HasComment("润观米提现申请记录");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AccountNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("账户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ApplyNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("申请单号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("创建人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("点击量");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<SystemSet>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");

+ 2 - 0
Service/Main/ConsumerOrdersService.cs

@@ -41,6 +41,7 @@ namespace MySystem.Service.Main
             fields.Add("MaxDivi"); //最大分红
             fields.Add("CurDivi"); //当前分红
             fields.Add("IsAct"); //是否活动
+            fields.Add("ReturnFlag");
 
             Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ConsumerOrders", relationData, orderBy, page, limit, condition, fields);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
@@ -63,6 +64,7 @@ namespace MySystem.Service.Main
             fields.Add("MaxDivi"); //最大分红
             fields.Add("CurDivi"); //当前分红
             fields.Add("IsAct"); //是否活动
+            fields.Add("ReturnFlag");
 
             Dictionary<string, object> obj = new DbService(AppConfig.Base.mainTables, _conn).IndexData("ConsumerOrders", relationData, orderBy, page, limit, condition, fields);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;

+ 6 - 0
Util/Business/BusinessUtil.cs

@@ -42,6 +42,7 @@ namespace MySystem
                 curData.Add("WeChatInFactAmount", decimal.Parse(subdata["WeChatInfactAmount"].ToString()).ToString("f2")); //微信实收
                 curData.Add("AliPayInFactAmount", decimal.Parse(subdata["AliPayInFactAmount"].ToString()).ToString("f2")); //支付宝实收
                 curData.Add("OrderCount", subdata["OderCount"].ToString()); //订单数
+                curData.Add("Kind", 2); //通道(1 直连 2 银联)
                 dataList.Add(curData);
             }
             return dataList;
@@ -100,6 +101,7 @@ namespace MySystem
                 curData.Add("PayMode", subdata["PayMode"].ToString()); //支付方式(1 支付宝 2 微信)
                 curData.Add("IsAct", subdata["IsAct"].ToString()); //是否活动(1 是 0 否)
                 curData.Add("PayMoney", decimal.Parse(subdata["PayMoney"].ToString()).ToString("f2")); //订单金额
+                curData.Add("Kind", 2); //通道(1 直连 2 银联)
                 dataList.Add(curData);
             }
             return dataList;
@@ -120,11 +122,15 @@ namespace MySystem
             List<Dictionary<string, object>> source = ConsumerOrdersService.List(relationData, condition, 1, 999);
             foreach (Dictionary<string, object> subdata in source)
             {
+                var leaveAmount = decimal.Parse(subdata["MaxDivi"].ToString()) - decimal.Parse(subdata["CurDivi"].ToString());
                 obj.Add("TradeDate", DateTime.Parse(subdata["CreateDate"].ToString()).ToString("yyyy-MM-dd HH:mm:ss")); //日期
                 obj.Add("PayMode", subdata["PayMode"].ToString()); //支付方式(1 微信 2 支付宝)
                 obj.Add("PayMoney", decimal.Parse(subdata["PayMoney"].ToString()).ToString("f2")); //支付金额
                 obj.Add("IsAct", subdata["IsAct"].ToString()); //是否活动(1 是 0 否)
                 obj.Add("OrderNo", subdata["OrderNo"].ToString()); //订单号
+                obj.Add("ReturnFlag", int.Parse(subdata["ReturnFlag"].ToString())); //返现标记(0 否 1 是)
+                obj.Add("Kind", 2); //通道(1 直连 2 银联)
+                obj.Add("LeaveAmount", leaveAmount); //剩余返现金额
                 obj.Add("MerchantName", MerchantInfoService.Query(int.Parse(subdata["MerchantId"].ToString())).Name); //交易门店
                 List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
                 List<Dictionary<string, object>> dics = ConsumerProfitService.List(relationData, " and OrderId=" + int.Parse(subdata["Id"].ToString()) + "", 1, 999);

+ 22 - 21
Util/RedisDbconn.cs

@@ -149,7 +149,7 @@ namespace MySystem
         #region 移除列表
         public long RemoveFromList(string key, object value, int count = 1)
         {            
-            return csredis.LRem(key, count, value);
+            return RedisHelper.LRem(key, count, value);
         }
         #endregion
 
@@ -222,12 +222,12 @@ namespace MySystem
 
         public bool Exists(string key)
         {
-            return csredis.Exists(key);
+            return RedisHelper.Exists(key);
         }
 
         public long AddRightList(string key, object value)
         {
-            return csredis.RPush(key, value);
+            return RedisHelper.RPush(key, value);
             // return 0;
         }
         /// <summary>
@@ -253,16 +253,17 @@ namespace MySystem
         public bool GetLock(string requestId)
         {
             //设置key 设置过期时间20s
-            while (true)
-            {
-                //设置key Redis2.6.12以上版本,可以用set获取锁。set可以实现setnx和expire,这个是原子操作
-                if (csredis.Set(lockKey, requestId, lockTime, CSRedis.RedisExistence.Nx))
-                {
-                    //设置成功后开启子线程为key续命
-                    CreateThredXm();
-                    return true;
-                }
-            }
+            // while (true)
+            // {
+            //     //设置key Redis2.6.12以上版本,可以用set获取锁。set可以实现setnx和expire,这个是原子操作
+            //     if (RedisHelper.Set(lockKey, requestId, lockTime, RedisHelper.RedisExistence.Nx))
+            //     {
+            //         //设置成功后开启子线程为key续命
+            //         CreateThredXm();
+            //         return true;
+            //     }
+            // }
+            return true;
         }
 
         /// <summary>
@@ -281,12 +282,12 @@ namespace MySystem
                         return;
                     }
                     //查询key还有多少秒释放
-                    var Seconds = csredis.PTtl(lockKey) / 1000;
+                    var Seconds = RedisHelper.PTtl(lockKey) / 1000;
                     //key还剩1/3秒时重设过期时间
                     if (Seconds < (lockTime / 3))
                     {
                         //小于5秒则自动 重设过期时间
-                        csredis.Expire(lockKey, lockTime);
+                        RedisHelper.Expire(lockKey, lockTime);
                     }
                 }
             }, tokenSource.Token);
@@ -299,12 +300,12 @@ namespace MySystem
         public void ReleaseLock(string requestId)
         {
             //这里使用Lua脚本保证原子性操作
-            string script = "if  redis.call('get', KEYS[1]) == ARGV[1] then " +
-                    "return redis.call('del', KEYS[1]) " +
-                    "else return 0 end";
-            csredis.Eval(script, lockKey, requestId);
-            //取消续命线程
-            tokenSource.Cancel();
+            // string script = "if  redis.call('get', KEYS[1]) == ARGV[1] then " +
+            //         "return redis.call('del', KEYS[1]) " +
+            //         "else return 0 end";
+            // RedisHelper.Eval(script, lockKey, requestId);
+            // //取消续命线程
+            // tokenSource.Cancel();
         }
     }
 }