Ver Fonte

fix bug: 获取custom的shopId

shizhongqi há 9 meses atrás
pai
commit
e979592aeb
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      app-ghs/controllers/OrderController.php

+ 3 - 1
app-ghs/controllers/OrderController.php

@@ -1342,8 +1342,10 @@ class OrderController extends BaseController
                         //$noticeKey = "ghsKdNoticeHd";
                         //$noticeKey = "ghsKdNoticeHd";
                         //Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
                         //Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
 
 
+                        Yii::info('向花店App发通知');
+                        $custom = CustomClass::getById($order->customId);
                         //向花店App发通知
                         //向花店App发通知
-                        $allDevices = \bizHd\device\classes\HdDeviceClass::getAllByCondition(['shopId'=>$shopId]);
+                        $allDevices = \bizHd\device\classes\HdDeviceClass::getAllByCondition(['mainId'=>$custom['shopId']]);
                         $cids = array_column($allDevices, 'clientId');
                         $cids = array_column($allDevices, 'clientId');
                         $title = '买花成功';
                         $title = '买花成功';
                         $shopName = $shop->merchantName . $shop->shopName != '首店' ? '(' . $shop->shopName . ')' : '';
                         $shopName = $shop->merchantName . $shop->shopName != '首店' ? '(' . $shop->shopName . ')' : '';