Explorar o código

补订单队列

lichunlei hai 1 ano
pai
achega
f8b1629562
Modificáronse 1 ficheiros con 43 adicións e 29 borrados
  1. 43 29
      Controllers/HomeController.cs

+ 43 - 29
Controllers/HomeController.cs

@@ -37,16 +37,29 @@ namespace MySystem.Controllers
             // TianYuVoiceHelper.Instance.doSomething(DateTime.Now.ToString("yyyyMMddHHmmssfff"),"2023100701","100");
             // MqLinksHelper.Instance.doSomething("LKB01230600250000585","100");
 
-            // WebCMSEntities db = new WebCMSEntities();
-            // Dictionary<string, decimal> ids = new Dictionary<string, decimal>();
-            // ids.Add("2023110210011368216017215", 262.47M);
-            // foreach(string orderno in ids.Keys)
-            // {
-            //     decimal cur = ids[orderno];
-            //     ConsumerOrders order = db.ConsumerOrders.FirstOrDefault(m => m.OrderNo == orderno) ?? new ConsumerOrders();
-            //     order.CurDivi = cur;
-            //     RedisDbconn.Instance.AddList("ConsumerOrdersHd:Divi:" + order.PayMode + ":" + order.MerchantId, order);
-            // }
+            WebCMSEntities db = new WebCMSEntities();
+            Dictionary<string, decimal> ids = new Dictionary<string, decimal>();
+            ids.Add("2023110100101889870873103", 165.01M);
+            ids.Add("2023110823050361106411696", 162.39M);
+            ids.Add("2023103111150680882895028", 129.97M);
+            ids.Add("2023110115111893112798296", 186.66M);
+            ids.Add("2023110119350047351848839", 219.15M);
+            ids.Add("2023103121092345128864326", 132.51M);
+            ids.Add("2023110119465569176817757", 219.16M);
+            ids.Add("2023110119570851706448968", 219.16M);
+            ids.Add("2023110119282078572281345", 208.32M);
+            ids.Add("2023103111025117492478602", 151.62M);
+            ids.Add("2023103111023104266492281", 129.96M);
+            ids.Add("2023103111020866149098706", 140.79M);
+            ids.Add("2023103111014803279616494", 162.45M);
+            ids.Add("2023103111011872712858973", 173.28M);
+            foreach(string orderno in ids.Keys)
+            {
+                decimal cur = ids[orderno];
+                ConsumerOrders order = db.ConsumerOrders.FirstOrDefault(m => m.OrderNo == orderno) ?? new ConsumerOrders();
+                order.CurDivi = cur;
+                RedisDbconn.Instance.AddList("ConsumerOrdersHd:Divi:" + order.PayMode + ":" + order.MerchantId, order);
+            }
 
             // List<int> ids = new List<int>();
             // ids.Add(4058);
@@ -87,27 +100,28 @@ namespace MySystem.Controllers
 
             // db.Dispose();
 
-            decimal settleAmount = b / 100M;
-            decimal divideAmt = (1 - 0.0038M) * a;
-            divideAmt = decimal.Parse(divideAmt.ToString("f2"));
-            decimal hdfee = 0.0038M * a * (1 - g / 100 - 0.01M);
-            hdfee = decimal.Parse(hdfee.ToString("f2"));
-            decimal servicefee = 0.01M * a - hdfee;
-            servicefee = decimal.Parse(servicefee.ToString("f2"));
-            decimal amount = a*(1-0.0038M) - servicefee;
-            amount = decimal.Parse(amount.ToString("f2"));
-            decimal otherAmt = settleAmount - servicefee - amount;
-            if(otherAmt != 0)
-            {
-                amount += otherAmt;
-            }
+            // decimal settleAmount = b / 100M;
+            // decimal divideAmt = (1 - 0.0038M) * a;
+            // divideAmt = decimal.Parse(divideAmt.ToString("f2"));
+            // decimal hdfee = 0.0038M * a * (1 - g / 100 - 0.01M);
+            // hdfee = decimal.Parse(hdfee.ToString("f2"));
+            // decimal servicefee = 0.01M * a - hdfee;
+            // servicefee = decimal.Parse(servicefee.ToString("f2"));
+            // decimal amount = a*(1-0.0038M) - servicefee;
+            // amount = decimal.Parse(amount.ToString("f2"));
+            // decimal otherAmt = settleAmount - servicefee - amount;
+            // if(otherAmt != 0)
+            // {
+            //     amount += otherAmt;
+            // }
 
-            amount = amount * 100; //金额(分)
-            servicefee = servicefee * 100;
-            string seviceAmount = servicefee.ToString("f0"); //服务费
-            string amountAmount = amount.ToString("f0");
+            // amount = amount * 100; //金额(分)
+            // servicefee = servicefee * 100;
+            // string seviceAmount = servicefee.ToString("f0"); //服务费
+            // string amountAmount = amount.ToString("f0");
 
-            return amountAmount + ":" + seviceAmount;
+            // return amountAmount + ":" + seviceAmount;
+            return "ok";
         }
 
         public string bindapp(int mid)