@@ -62,6 +62,8 @@ class ShopAdminController extends BaseController
if ($openShop != AdminClass::OPEN_SHOP_NO) {
util::fail('您已申请开过店,不能成为别人的员工');
}
+ // 头像
+ $post['avatar'] = $admin['avatar'];
$respond = ShopAdminService::generateAdmin($post);
util::success($respond);
@@ -61,6 +61,8 @@ class ShopAdminController extends BaseController
@@ -105,7 +105,12 @@ class ShopAdminService extends BaseService
'mobile' => $mobile,
];
ShopAdminClass::delBindAdminData($shopId, $recommendAdminId);
- return ShopAdminClass::add($addData);
+
+ $result = ShopAdminClass::add($addData);
+ // 员工数+1
+ AdminRoleClass::counters(['num' => 1], ['id' => $roleId]);
+ return $result;
//获取管理员 ssh 2020.4.21
@@ -199,7 +199,6 @@ class ShopAdminClass extends BaseClass
if (isset($admin->currentShopId) && $admin->currentShopId == $currentShopId) {
$has = self::getByCondition(['adminId' => $adminId, 'delStatus' => 0, 'status' => 1], true);
if (!empty($has)) {
-
$hasId = $has->shopId;
$admin->currentShopId = $hasId;
} else {