|
|
@@ -5,6 +5,7 @@ namespace shop\controllers;
|
|
|
use biz\admin\classes\AdminClass;
|
|
|
use biz\admin\services\ShopAdminService;
|
|
|
use biz\custom\classes\CustomClass;
|
|
|
+use bizTy\shop\classes\ShopAdminClass;
|
|
|
use bizTy\sj\classes\MerchantExtendClass;
|
|
|
use biz\merchant\classes\ShopClass;
|
|
|
use biz\merchant\services\AdminService;
|
|
|
@@ -21,7 +22,7 @@ class BaseController extends PublicController
|
|
|
{
|
|
|
|
|
|
public $admin, $adminId, $adminAvatar, $account, $customId = 0, $custom;
|
|
|
- public $sjId = 0, $sj = [], $sjExtend = [], $signPackage, $shopId = 0;
|
|
|
+ public $sjId = 0, $sj = [], $sjExtend = [], $signPackage, $shopId = 0, $shopAdminId = 0, $shopAdmin = [];
|
|
|
public $appId;
|
|
|
public $isWx = false;
|
|
|
public $isLogin = false;
|
|
|
@@ -82,6 +83,12 @@ class BaseController extends PublicController
|
|
|
if (empty($shop)) {
|
|
|
util::fail('没有找到店铺');
|
|
|
}
|
|
|
+ $shopAdmin = ShopAdminClass::getByCondition(['shopId' => $currentShopId, 'adminId' => $adminId, 'delStatus' => 0]);
|
|
|
+ if (empty($shopAdmin)) {
|
|
|
+ util::fail('没有找到员工信息');
|
|
|
+ }
|
|
|
+ $this->shopAdmin = $shopAdmin;
|
|
|
+ $this->shopAdminId = $shopAdmin['id'] ?? 0;
|
|
|
$sjId = $shop['merchantId'];
|
|
|
$this->sjId = $sjId;
|
|
|
$sj = MerchantService::getMerchantById($sjId);
|
|
|
@@ -91,6 +98,6 @@ class BaseController extends PublicController
|
|
|
}
|
|
|
return parent::beforeAction($action);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|