shish 3 rokov pred
rodič
commit
227f10b0cd

+ 2 - 2
app-ghs/controllers/ShopController.php

@@ -34,7 +34,7 @@ class ShopController extends BaseController
         $shopList = [];
         if (isset($staff->super) && $staff->super == 1) {
             $sjId = $this->sjId ?? 0;
-            $shopList = ShopClass::getAllByCondition(['sjId' => $sjId], null, 'id,shopName,merchantName,sjId,mainId', 'id');
+            $shopList = ShopClass::getAllByCondition(['sjId' => $sjId, 'ptStyle' => 2], null, 'id,shopName,merchantName,sjId,mainId', 'id');
         }
         $adminId = $this->adminId ?? 0;
         $staffList = ShopAdminClass::getAllByCondition(['adminId' => $adminId], null, '*', null, true);
@@ -51,7 +51,7 @@ class ShopController extends BaseController
             }
         }
         if (!empty($mainIdList)) {
-            $addShopList = ShopClass::getAllByCondition(['mainId' => ['in', $mainIdList]], null, 'id,shopName,merchantName,sjId,mainId', 'id');
+            $addShopList = ShopClass::getAllByCondition(['mainId' => ['in', $mainIdList], 'ptStyle' => 2], null, 'id,shopName,merchantName,sjId,mainId', 'id');
             if (!empty($addShopList)) {
                 foreach ($addShopList as $addShop) {
                     $addShopId = $addShop['id'] ?? 0;

+ 2 - 2
app-hd/controllers/ShopController.php

@@ -30,7 +30,7 @@ class ShopController extends BaseController
         $shopList = [];
         if (isset($staff->super) && $staff->super == 1) {
             $sjId = $this->sjId ?? 0;
-            $shopList = ShopClass::getAllByCondition(['sjId' => $sjId], null, 'id,shopName,merchantName,sjId,mainId', 'id');
+            $shopList = ShopClass::getAllByCondition(['sjId' => $sjId, 'ptStyle' => 1], null, 'id,shopName,merchantName,sjId,mainId', 'id');
         }
         $adminId = $this->adminId ?? 0;
         $staffList = ShopAdminClass::getAllByCondition(['adminId' => $adminId], null, '*', null, true);
@@ -47,7 +47,7 @@ class ShopController extends BaseController
             }
         }
         if (!empty($mainIdList)) {
-            $addShopList = ShopClass::getAllByCondition(['mainId' => ['in', $mainIdList]], null, 'id,shopName,merchantName,sjId,mainId', 'id');
+            $addShopList = ShopClass::getAllByCondition(['mainId' => ['in', $mainIdList], 'ptStyle' => 1], null, 'id,shopName,merchantName,sjId,mainId', 'id');
             if (!empty($addShopList)) {
                 foreach ($addShopList as $addShop) {
                     $addShopId = $addShop['id'] ?? 0;