lcl 1 rok pred
rodič
commit
69a4f80304

+ 2 - 2
AppStart/Helper/AlipayPayBackService.cs

@@ -77,8 +77,8 @@ namespace MySystem
                     db.SaveChanges();
 
                     //语音播报
-                    PosMachines machine = db.PosMachines.FirstOrDefault(m => m.PosSn == order.SnNo);
-                    if(machine != null)
+                    var machines = db.PosMachines.Select(m => new { m.DeviceKind, m.BrandId, m.Detail, m.BindMerchantId }).Where(m => m.DeviceKind == "1" && m.BindMerchantId == order.MerchantId);
+                    foreach(var machine in machines)
                     {
                         if(machine.BrandId == 2)
                         {

+ 2 - 2
AppStart/Helper/WeChatPayBackService.cs

@@ -89,8 +89,8 @@ namespace MySystem
                             db.SaveChanges();
 
                             //语音播报
-                            PosMachines machine = db.PosMachines.FirstOrDefault(m => m.PosSn == order.SnNo);
-                            if(machine != null)
+                            var machines = db.PosMachines.Select(m => new { m.DeviceKind, m.BrandId, m.Detail, m.BindMerchantId }).Where(m => m.DeviceKind == "1" && m.BindMerchantId == order.MerchantId);
+                            foreach(var machine in machines)
                             {
                                 if(machine.BrandId == 2)
                                 {