|
|
@@ -152,11 +152,10 @@ class ShopController extends BaseController
|
|
|
//切换门店 lqh 2021.1.31
|
|
|
public function actionToggleShop()
|
|
|
{
|
|
|
- //惠雅、昱成、问境、丰行员工不能切换门店,二个地方要修改
|
|
|
$shopAdmin = $this->shopAdmin;
|
|
|
- $adminId = $shopAdmin->adminId ?? 0;
|
|
|
- if (in_array($adminId, [2812, 3539, 3735, 3407, 9604, 10097, 5180])) {
|
|
|
- util::fail('不允许切换门店');
|
|
|
+ $switchShop = \biz\shop\classes\ShopAdminClass::hasSwitchShopRight($shopAdmin);
|
|
|
+ if ($switchShop == 0) {
|
|
|
+ util::fail('不能切换门店');
|
|
|
}
|
|
|
|
|
|
$newShopId = Yii::$app->request->post('shopId', 0);
|