shish 4 lat temu
rodzic
commit
de9ff672ae

+ 2 - 3
app-hd/controllers/OrderController.php

@@ -489,9 +489,8 @@ class OrderController extends BaseController
 
             $shopId = $order->shopId ?? 0;
             $shop = ShopClass::getById($shopId, true);
-            if ($order->payStatus == 1) {
-                WxMessageClass::gatheringIncomeInform($shop, $order);
-            }
+            WxMessageClass::gatheringIncomeInform($shop, $order);
+
 
             //新制作单提示
             $shopExt = ShopExtClass::getByCondition(['shopId' => $this->shopId], true);

+ 5 - 1
biz/wx/classes/WxMessageClass.php

@@ -403,6 +403,9 @@ class WxMessageClass extends BaseClass
     //收款码收入通知 ssh 20210531
     public static function gatheringIncomeInform($shop, $order)
     {
+        if ($order->payStatus != 1) {
+            return false;
+        }
         $ptStyle = $shop->ptStyle;
         $wxBase = WxOpenClass::getWxBase();
         $wx = $wxBase[$ptStyle] ?? [];
@@ -414,7 +417,8 @@ class WxMessageClass extends BaseClass
         }
         $actPrice = $order->actPrice;
         $orderId = $order->id;
-        $adminList = ShopAdminClass::getRemainAdmin($shop);
+        $currentStaffId = $order->shopAdminId ?? 0;
+        $adminList = ShopAdminClass::getRemainAdmin($shop, $currentStaffId);
         if (empty($adminList)) {
             return false;
         }