|
|
@@ -232,11 +232,23 @@ class NoticeController extends PublicController
|
|
|
$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]);
|
|
|
+
|
|
|
+ //向供货商APP发通知
|
|
|
+ $allDevices = \bizGhs\device\classes\GhsDeviceClass::getAllByCondition(['shopId'=>$shopId]);
|
|
|
+ $cids = array_column($allDevices, 'clientId');
|
|
|
+ $title = '你有新的订单';
|
|
|
+ $content = $shop->shopName . ' ¥' . $order->actPrice;
|
|
|
+ $payload = [
|
|
|
+ "page" => "pagesOrder/detail",
|
|
|
+ "params" => ["id" => $order->id]
|
|
|
+ ];
|
|
|
+ $push = new \common\components\push('ghs');
|
|
|
+ $push->pushByCloud($cids, $title, $content, $payload);
|
|
|
}
|
|
|
//花店采购供货商端APP收到通知
|
|
|
//NoticeClass::ghsNewOrderNotice($order);
|
|
|
@@ -464,6 +476,18 @@ class NoticeController extends PublicController
|
|
|
$noticeText = json_encode(['orderId' => $saleId]);
|
|
|
$noticeKey = "hdCgNoticeGhs";
|
|
|
Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
|
|
|
+
|
|
|
+ //向供货商APP发通知
|
|
|
+ $allDevices = \bizGhs\device\classes\GhsDeviceClass::getAllByCondition(['shopId'=>$shopId]);
|
|
|
+ $cids = array_column($allDevices, 'clientId');
|
|
|
+ $title = '你有新的订单';
|
|
|
+ $content = $shop->shopName . ' ¥' . $order->actPrice;
|
|
|
+ $payload = [
|
|
|
+ "page" => "pagesOrder/detail",
|
|
|
+ "params" => ["id" => $order->id]
|
|
|
+ ];
|
|
|
+ $push = new \common\components\push('ghs');
|
|
|
+ $push->pushByCloud($cids, $title, $content, $payload);
|
|
|
}
|
|
|
//花店采购供货商端APP收到通知
|
|
|
//NoticeClass::ghsNewOrderNotice($order);
|
|
|
@@ -595,6 +619,18 @@ class NoticeController extends PublicController
|
|
|
$noticeText = json_encode(['orderId' => $saleId]);
|
|
|
$noticeKey = "hdCgNoticeGhs";
|
|
|
Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
|
|
|
+
|
|
|
+ //向供货商端APP发通知
|
|
|
+ $allDevices = \bizGhs\device\classes\GhsDeviceClass::getAllByCondition(['shopId'=>$shopId]);
|
|
|
+ $cids = array_column($allDevices, 'clientId');
|
|
|
+ $title = '你有新的订单';
|
|
|
+ $content = $shop->shopName . ' ¥' . $order->actPrice;
|
|
|
+ $payload = [
|
|
|
+ "page" => "pagesOrder/detail",
|
|
|
+ "params" => ["id" => $order->id]
|
|
|
+ ];
|
|
|
+ $push = new \common\components\push('ghs');
|
|
|
+ $push->pushByCloud($cids, $title, $content, $payload);
|
|
|
}
|
|
|
//花店采购供货商端APP收到通知
|
|
|
//NoticeClass::ghsNewOrderNotice($order);
|
|
|
@@ -833,6 +869,18 @@ class NoticeController extends PublicController
|
|
|
$noticeText = json_encode(['orderId' => $saleId]);
|
|
|
$noticeKey = "hdCgNoticeGhs";
|
|
|
Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
|
|
|
+
|
|
|
+ //向供货商端APP发通知
|
|
|
+ $allDevices = \bizGhs\device\classes\GhsDeviceClass::getAllByCondition(['shopId'=>$shopId]);
|
|
|
+ $cids = array_column($allDevices, 'clientId');
|
|
|
+ $title = '你有新的订单';
|
|
|
+ $content = $shop->shopName . ' ¥' . $order->actPrice;
|
|
|
+ $payload = [
|
|
|
+ "page" => "pagesOrder/detail",
|
|
|
+ "params" => ["id" => $order->id]
|
|
|
+ ];
|
|
|
+ $push = new \common\components\push('ghs');
|
|
|
+ $push->pushByCloud($cids, $title, $content, $payload);
|
|
|
}
|
|
|
//花店采购供货商端APP收到通知
|
|
|
//NoticeClass::ghsNewOrderNotice($order);
|