Jelajahi Sumber

删除调升费率消息发送

DuGuYang 3 tahun lalu
induk
melakukan
f47398085b

+ 42 - 42
Areas/Admin/Controllers/MainServer/PosMachinesTwoChangeController.cs

@@ -503,48 +503,48 @@ namespace MySystem.Areas.Admin.Controllers
                 new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("PosMachinesTwo", Fields, id);
 
             }
-            string[] lists = userIds.TrimEnd(',').Split(new char[] { ',' });
-            int times = lists.ToList().Count;
-            if (upposIds.Count > 0)
-            {
-                //调升
-                for (int i = 0; i < times; i++)
-                {
-                    var UserId = lists[i];
-                    var posInfo = db.PosMachinesTwo.Where(m => upposIds.Contains(m.Id) && m.BuyUserId == Convert.ToInt32(UserId)).ToList();
-                    string snhtml = "<div style='margin-bottom: .48rem;'>";
-                    foreach (var items in posInfo)
-                    {
-                        var mer = db.PosMerchantInfo.FirstOrDefault(m => m.Id == items.BindMerchantId);
-                        string Name = mer.MerchantName;
-                        if (mer.BrandId == 2)
-                        {
-                            if (Name.Contains("-"))
-                            {
-                                Name = Name.Split('-')[1];
-                            }
-                            else if (Name.Contains("_"))
-                            {
-                                Name = Name.Split('_')[1];
-                            }
-                        }
-                        var brand = db.KqProducts.FirstOrDefault(m => m.Id == items.BrandId);
-                        snhtml += "<div style='margin-bottom: .48rem;'><div class='f16'>商户姓名:" + Name + "</div>";
-                        snhtml += "<div class='f16'>机具品牌:" + brand.Name + "</div>";
-                        snhtml += "<div class='f16'>SN:" + items.PosSn + "</div></div>";
-                    }
-                    snhtml += "</div>";
-                    RedisDbconn.Instance.AddList("MsgPersonalQueue", Newtonsoft.Json.JsonConvert.SerializeObject(new MsgPersonal()
-                    {
-                        UserId = Convert.ToInt32(UserId), //创客
-                        Title = "商户费率变更通知", //标题
-                        Content = "<div class='f16' style='margin-bottom: .72rem'>您的部分机具已绑定超过180天,刷卡费率已自动变更为0.63%,如需调整费率,请前往我的商户-商户详情中调整费率</div>" + snhtml, //内容
-                        Summary = "您的部分机具已绑定超过180天,刷卡费率已自动变更为0.63%,如需调整费率,请前往我的商户-商户详情中调整费率",
-                        CreateDate = DateTime.Now,
-
-                    }));
-                }
-            }
+            // string[] lists = userIds.TrimEnd(',').Split(new char[] { ',' });
+            // int times = lists.ToList().Count;
+            // if (upposIds.Count > 0)
+            // {
+            //     //调升
+            //     for (int i = 0; i < times; i++)
+            //     {
+            //         var UserId = lists[i];
+            //         var posInfo = db.PosMachinesTwo.Where(m => upposIds.Contains(m.Id) && m.BuyUserId == Convert.ToInt32(UserId)).ToList();
+            //         string snhtml = "<div style='margin-bottom: .48rem;'>";
+            //         foreach (var items in posInfo)
+            //         {
+            //             var mer = db.PosMerchantInfo.FirstOrDefault(m => m.Id == items.BindMerchantId);
+            //             string Name = mer.MerchantName;
+            //             if (mer.BrandId == 2)
+            //             {
+            //                 if (Name.Contains("-"))
+            //                 {
+            //                     Name = Name.Split('-')[1];
+            //                 }
+            //                 else if (Name.Contains("_"))
+            //                 {
+            //                     Name = Name.Split('_')[1];
+            //                 }
+            //             }
+            //             var brand = db.KqProducts.FirstOrDefault(m => m.Id == items.BrandId);
+            //             snhtml += "<div style='margin-bottom: .48rem;'><div class='f16'>商户姓名:" + Name + "</div>";
+            //             snhtml += "<div class='f16'>机具品牌:" + brand.Name + "</div>";
+            //             snhtml += "<div class='f16'>SN:" + items.PosSn + "</div></div>";
+            //         }
+            //         snhtml += "</div>";
+            //         RedisDbconn.Instance.AddList("MsgPersonalQueue", Newtonsoft.Json.JsonConvert.SerializeObject(new MsgPersonal()
+            //         {
+            //             UserId = Convert.ToInt32(UserId), //创客
+            //             Title = "商户费率变更通知", //标题
+            //             Content = "<div class='f16' style='margin-bottom: .72rem'>您的部分机具已绑定超过180天,刷卡费率已自动变更为0.63%,如需调整费率,请前往我的商户-商户详情中调整费率</div>" + snhtml, //内容
+            //             Summary = "您的部分机具已绑定超过180天,刷卡费率已自动变更为0.63%,如需调整费率,请前往我的商户-商户详情中调整费率",
+            //             CreateDate = DateTime.Now,
+
+            //         }));
+            //     }
+            // }
             db.SaveChanges();
             return "success";
         }