|
|
@@ -2,15 +2,19 @@
|
|
|
|
|
|
namespace hd\controllers;
|
|
|
|
|
|
-use biz\shop\classes\ShopExtClass;
|
|
|
+use biz\shop\classes\ShopClass;
|
|
|
+use biz\notice\classes\NoticeClass;
|
|
|
use bizGhs\order\classes\RefundOrderClass;
|
|
|
use bizHd\cg\classes\CgRefundClass;
|
|
|
+use bizHd\purchase\classes\PurchaseClass;
|
|
|
use bizHd\wx\classes\WxOpenClass;
|
|
|
use common\components\dict;
|
|
|
use common\components\noticeUtil;
|
|
|
use common\components\payUtil;
|
|
|
use Yii;
|
|
|
use common\components\util;
|
|
|
+use biz\wx\classes\WxMessageClass;
|
|
|
+use bizGhs\order\classes\OrderClass;
|
|
|
|
|
|
class NoticeController extends PublicController
|
|
|
{
|
|
|
@@ -49,8 +53,27 @@ class NoticeController extends PublicController
|
|
|
//支付成功后续流程
|
|
|
payUtil::thirdPay($wxPay, $capitalType, $orderSn, $totalFee, $attach, $transactionId);
|
|
|
$transaction->commit();
|
|
|
- //花店采购供货商端收到通知
|
|
|
- ShopExtClass::hdCgGhsReport($orderSn);
|
|
|
+ $cg = PurchaseClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
+ if (!empty($cg)) {
|
|
|
+ //微信通知
|
|
|
+ $saleId = $cg->saleId ?? 0;
|
|
|
+ $order = OrderClass::getById($saleId, true);
|
|
|
+ if (!empty($order)) {
|
|
|
+ $shopId = $order->shopId ?? 0;
|
|
|
+ $shop = ShopClass::getById($shopId, true);
|
|
|
+ if (!empty($shop)) {
|
|
|
+ WxMessageClass::ghsHasNewOrderInform($shop, $order);
|
|
|
+ }
|
|
|
+ //订单生成时唤起在线打印
|
|
|
+ if (isset($order->needPrint) && $order->needPrint == dict::getDict('needPrint', 'need')) {
|
|
|
+ OrderClass::onlinePrint($order);
|
|
|
+ $order->printNum += 1;
|
|
|
+ $order->save();
|
|
|
+ }
|
|
|
+ //花店采购供货商端收到通知
|
|
|
+ NoticeClass::ghsNewOrderNotice($order);
|
|
|
+ }
|
|
|
+ }
|
|
|
echo '<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>';
|
|
|
} catch (\Exception $e) {
|
|
|
$transaction->rollBack();
|