shish 3 ani în urmă
părinte
comite
b095f85c43
1 a modificat fișierele cu 14 adăugiri și 14 ștergeri
  1. 14 14
      app-ghs/controllers/OrderController.php

+ 14 - 14
app-ghs/controllers/OrderController.php

@@ -1066,12 +1066,14 @@ class OrderController extends BaseController
 
                 $shopId = $order->shopId ?? 0;
                 $shop = ShopClass::getById($shopId, true);
-                if (!empty($shop)) {
-                    //花店采购供货商端收到微信通知
-                    //WxMessageClass::ghsHasNewOrderInform($shop, $order);
-                    $noticeText = json_encode(['orderId' => $saleId]);
-                    $noticeKey = "hdCgNoticeGhs";
-                    Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
+                if (isset($order->payStatus) && $order->payStatus == 1) {
+                    if (!empty($shop)) {
+                        //花店采购供货商端收到微信通知
+                        //WxMessageClass::ghsHasNewOrderInform($shop, $order);
+                        $noticeText = json_encode(['orderId' => $saleId]);
+                        $noticeKey = "hdCgNoticeGhs";
+                        Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
+                    }
                 }
                 //订单生成时唤起在线打印
                 if (isset($order->needPrint) && $order->needPrint == dict::getDict('needPrint', 'need')) {
@@ -1270,14 +1272,12 @@ class OrderController extends BaseController
         if (!empty($order)) {
             $shopId = $order->shopId ?? 0;
             $shop = ShopClass::getById($shopId, true);
-            if (isset($order->payStatus) && $order->payStatus == 1) {
-                if (!empty($shop)) {
-                    //花店采购供货商端微信收到通知
-                    //WxMessageClass::ghsHasNewOrderInform($shop, $order);
-                    $noticeText = json_encode(['orderId' => $id]);
-                    $noticeKey = "hdCgNoticeGhs";
-                    Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
-                }
+            if (!empty($shop)) {
+                //花店采购供货商端微信收到通知
+                //WxMessageClass::ghsHasNewOrderInform($shop, $order);
+                $noticeText = json_encode(['orderId' => $id]);
+                $noticeKey = "hdCgNoticeGhs";
+                Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
             }
             //订单生成时唤起在线打印
             if (isset($order->needPrint) && $order->needPrint == dict::getDict('needPrint', 'need')) {