|
|
@@ -134,7 +134,19 @@ class NoticeController extends PublicController
|
|
|
WxMessageClass::customRechargeClearInform($shop, $customRecharge);
|
|
|
}
|
|
|
|
|
|
- //零售采购结账通知
|
|
|
+ //零售线上结账通知
|
|
|
+ if ($capitalType == dict::getDict('capitalType', 'hdPurchaseClear', 'id')) {
|
|
|
+ $clearInfo = PurchaseClearClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
+ $customId = $clearInfo->customId ?? 0;
|
|
|
+ $ghsShopId = $clearInfo->ghsShopId ?? 0;
|
|
|
+ $ghsShop = ShopClass::getById($ghsShopId, true);
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ if (!empty($custom) && !empty($ghsShop)) {
|
|
|
+ WxMessageClass::customHasClearToGhsInform($ghsShop, $clearInfo, $custom);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //零售采购通知
|
|
|
if ($capitalType == dict::getDict('capitalType', 'xhPurchase', 'id')) {
|
|
|
$cg = PurchaseClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
$saleId = $cg->saleId ?? 0;
|
|
|
@@ -234,18 +246,10 @@ class NoticeController extends PublicController
|
|
|
$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发通知
|
|
|
-// $cgShop = ShopClass::getById($cg->shopId, true, 'shopName, merchantName');
|
|
|
-// $push = new push('ghs', push::MSG_TYPE_ORDER);
|
|
|
-// $push->ghsOrderMessage($shop, $cgShop, $order);
|
|
|
}
|
|
|
- //花店采购供货商端APP收到通知
|
|
|
- //NoticeClass::ghsNewOrderNotice($order);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -353,7 +357,6 @@ class NoticeController extends PublicController
|
|
|
$ghsShop = ShopClass::getById($ghsShopId, true);
|
|
|
$custom = CustomClass::getById($customId, true);
|
|
|
if (!empty($custom) && !empty($ghsShop)) {
|
|
|
- //WxMessageClass::clearInform($ghsShop, $clearInfo, $custom);
|
|
|
WxMessageClass::customHasClearToGhsInform($ghsShop, $clearInfo, $custom);
|
|
|
}
|
|
|
}
|