Parcourir la source

fix bug: 获取custom的shopId

shizhongqi il y a 9 mois
Parent
commit
e979592aeb
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  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";
                         //Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
 
+                        Yii::info('向花店App发通知');
+                        $custom = CustomClass::getById($order->customId);
                         //向花店App发通知
-                        $allDevices = \bizHd\device\classes\HdDeviceClass::getAllByCondition(['shopId'=>$shopId]);
+                        $allDevices = \bizHd\device\classes\HdDeviceClass::getAllByCondition(['mainId'=>$custom['shopId']]);
                         $cids = array_column($allDevices, 'clientId');
                         $title = '买花成功';
                         $shopName = $shop->merchantName . $shop->shopName != '首店' ? '(' . $shop->shopName . ')' : '';