shish 3 سال پیش
والد
کامیت
d72813629a
2فایلهای تغییر یافته به همراه22 افزوده شده و 0 حذف شده
  1. 8 0
      app-ghs/controllers/OrderController.php
  2. 14 0
      biz/shop/classes/ShopExtClass.php

+ 8 - 0
app-ghs/controllers/OrderController.php

@@ -985,6 +985,14 @@ class OrderController extends BaseController
                     //花店采购供货商端收到通知
                     NoticeClass::ghsNewOrderNotice($order);
                 }
+
+                //前台提醒出示付款码
+                if (isset($order->status) && $order->status == 1) {
+                    if (isset($post['isCashier']) && $post['isCashier'] == 1) {
+                        ShopExtClass::ghsPleasePayReport($order);
+                    }
+                }
+
             }
             util::success($return);
         } catch (\Exception $e) {

+ 14 - 0
biz/shop/classes/ShopExtClass.php

@@ -265,6 +265,20 @@ class ShopExtClass extends BaseClass
         }
     }
 
+    //供货商收银台 ssh 20230421
+    public static function ghsPleasePayReport($order)
+    {
+        $shopId = $order->shopId ?? 0;
+        $shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], true);
+        if (isset($shopExt->lbSn) && !empty($shopExt->lbSn)) {
+            $mainPay = $order->actPrice ? floatval($order->actPrice) : 0;
+            $sound = $mainPay . '元,请出示付款码';
+            $url = "https://speaker.17laimai.cn/notify.php?id={$shopExt->lbSn}&token=HK1626595800&version={$shopExt->lbVersion}&message=" . $sound;
+            $curl = new curl\Curl();
+            $curl->get($url);
+        }
+    }
+
     //零售花店收款声音播放 ssh 20220423
     public static function hdGatheringReport($order)
     {