shish 4 ani în urmă
părinte
comite
ac13c025ee

+ 2 - 0
app-hd/controllers/AdminController.php

@@ -36,6 +36,7 @@ class AdminController extends BaseController
         if (empty($currentShop)) {
             util::fail('没有找到门店');
         }
+        $pfShopId = $currentShop->pfShopId ?? 0;
         $mainId = $currentShop->mainId ?? 0;
         $adminId = $admin['id'];
         $shopAdmin = ShopAdminService::getByCondition(['adminId' => $adminId, 'mainId' => $mainId, 'delStatus' => 0], true);
@@ -68,6 +69,7 @@ class AdminController extends BaseController
             'shopId' => $currentShopId,
             'shopAdminId' => $shopAdminId,
             'switchShop' => $switchShop,
+            'pfShopId' => $pfShopId,
             'showDemo' => $showDemo,
             'imgUploadApi' => $imgUploadApi,
             //有小程序新版本提示更新

+ 2 - 0
app-hd/controllers/ApplyController.php

@@ -178,6 +178,7 @@ class ApplyController extends BaseController
             $newShop = $passInfo['shop'] ?? [];
             $newMainId = $newShop->mainId ?? 0;
             $newShopId = $newShop->id ?? 0;
+            $pfShopId = $newShop->pfShopId ?? 0;
             //前端用于判断是否注册
             $admin['currentShopId'] = $newShopId;
             $adminId = $admin['id'];
@@ -209,6 +210,7 @@ class ApplyController extends BaseController
                 'shopId' => $currentShopId,
                 'shopAdminId' => $shopAdminId,
                 'switchShop' => $switchShop,
+                'pfShopId' => $pfShopId,
                 'showDemo' => $showDemo,
                 'imgUploadApi' => $imgUploadApi,
                 //有小程序新版本提示更新

+ 2 - 0
app-hd/controllers/AuthController.php

@@ -74,6 +74,7 @@ class AuthController extends PublicController
         if (empty($currentShop)) {
             util::fail('没有找到门店');
         }
+        $pfShopId = $currentShop->pfShopId ?? 0;
         $mainId = $currentShop->mainId ?? 0;
         $adminId = $admin['id'];
         $shopAdmin = ShopAdminService::getByCondition(['adminId' => $adminId, 'mainId' => $mainId], true);
@@ -110,6 +111,7 @@ class AuthController extends PublicController
             'shopId' => $currentShopId,
             'shopAdminId' => $shopAdminId,
             'switchShop' => $switchShop,
+            'pfShopId' => $pfShopId,
             'showDemo' => $showDemo,
             'imgUploadApi' => $imgUploadApi,
             //有小程序新版本提示更新

+ 6 - 3
biz/notice/classes/NoticeClass.php

@@ -16,7 +16,11 @@ class NoticeClass extends BaseClass
     {
         //app消息通知
         $shopId = $order->shopId ?? 0;
-        $adminList = ShopAdminClass::getRemainAdmin($shopId);
+        $shop = ShopClass::getById($shopId, true);
+        if (empty($shop)) {
+            return false;
+        }
+        $adminList = ShopAdminClass::getRemainAdmin($shop);
         if (empty($adminList)) {
             return false;
         }
@@ -35,11 +39,10 @@ class NoticeClass extends BaseClass
     //提现审核通过通知所有人 ssh 20210115
     public static function cashPassNotice($shop, $cash)
     {
-        $shopId = $shop->id;
         $ptStyle = $shop->ptStyle;
         $amount = $cash->amount;
         Yii::$app->params['ptStyle'] = $ptStyle;
-        $adminList = ShopAdminClass::getRemainAdmin($shopId);
+        $adminList = ShopAdminClass::getRemainAdmin($shop);
         if (empty($adminList)) {
             return false;
         }

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

@@ -607,7 +607,6 @@ class WxMessageClass extends BaseClass
     //供货商客户领取了新人红包 ssh 20211027
     public static function ghsCustomGetNewGiftInform($shop, $custom)
     {
-        $shopId = $shop->id ?? 0;
         $ptStyle = $shop->ptStyle ?? 0;
         $wxBase = WxOpenClass::getWxBase();
         $wx = $wxBase[$ptStyle] ?? [];
@@ -620,7 +619,7 @@ class WxMessageClass extends BaseClass
         $customId = $custom['id'] ?? 0;
         $customName = $custom['name'] ?? '';
 
-        $adminList = ShopAdminClass::getRemainAdmin($shopId);
+        $adminList = ShopAdminClass::getRemainAdmin($shop);
         if (empty($adminList)) {
             return false;
         }
@@ -650,7 +649,6 @@ class WxMessageClass extends BaseClass
     //供货商的客户介绍新客并且下单,获得红包通知商家 ssh 20211027
     public static function ghsCustomTjGetGiftInform($shop, $custom, $beTjCustom)
     {
-        $shopId = $shop->id ?? 0;
         $ptStyle = $shop->ptStyle ?? 0;
         $wxBase = WxOpenClass::getWxBase();
         $wx = $wxBase[$ptStyle] ?? [];
@@ -663,7 +661,7 @@ class WxMessageClass extends BaseClass
         $customId = $custom->id ?? 0;
         $customName = $custom->name ?? '';
         $beTjCustomName = $beTjCustom->name ?? '';
-        $adminList = ShopAdminClass::getRemainAdmin($shopId);
+        $adminList = ShopAdminClass::getRemainAdmin($shop);
         if (empty($adminList)) {
             return false;
         }
@@ -693,7 +691,6 @@ class WxMessageClass extends BaseClass
     //花店推荐供货商客户获得红包 ssh 20211027
     public static function hdTjGhsCustomGetGiftInform($shop, $ghs, $beTjCustom)
     {
-        $shopId = $shop->id ?? 0;
         $ptStyle = $shop->ptStyle ?? 0;
         $wxBase = WxOpenClass::getWxBase();
         $wx = $wxBase[$ptStyle] ?? [];
@@ -706,7 +703,7 @@ class WxMessageClass extends BaseClass
         $beTjCustomName = $beTjCustom->name ?? '';
         $ghsName = $ghs->name ?? '';
 
-        $adminList = ShopAdminClass::getRemainAdmin($shopId);
+        $adminList = ShopAdminClass::getRemainAdmin($shop);
         if (empty($adminList)) {
             return false;
         }
@@ -736,7 +733,6 @@ class WxMessageClass extends BaseClass
     //供应商新客户通知 ssh 20210909
     public static function newGhsCustomInform($shop, $custom, $introduce)
     {
-        $shopId = $shop['id'] ?? 0;
         $ptStyle = $shop['ptStyle'] ?? 0;
         $wxBase = WxOpenClass::getWxBase();
         $wx = $wxBase[$ptStyle] ?? [];
@@ -749,7 +745,7 @@ class WxMessageClass extends BaseClass
         $customId = $custom['id'] ?? 0;
         $customName = $custom['name'] ?? '';
         $date = date("Y-m-d H:i:s");
-        $adminList = ShopAdminClass::getRemainAdmin($shopId);
+        $adminList = ShopAdminClass::getRemainAdmin($shop);
         if (empty($adminList)) {
             return false;
         }
@@ -808,7 +804,7 @@ class WxMessageClass extends BaseClass
         if (empty($tempId)) {
             return false;
         }
-        $adminList = ShopAdminClass::getRemainAdmin($shopId);
+        $adminList = ShopAdminClass::getRemainAdmin($shopInfo);
         if (empty($adminList)) {
             return false;
         }