sorry 5 лет назад
Родитель
Сommit
fcbfbda353

+ 2 - 0
app-ghs/controllers/ShopAdminController.php

@@ -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);
     }

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

@@ -61,6 +61,8 @@ class ShopAdminController extends BaseController
         if ($openShop != AdminClass::OPEN_SHOP_NO) {
             util::fail('您已申请开过店,不能成为别人的员工');
         }
+        // 头像
+        $post['avatar'] = $admin['avatar'];
         $respond = ShopAdminService::generateAdmin($post);
         util::success($respond);
     }

+ 6 - 1
biz-hd/admin/services/ShopAdminService.php

@@ -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

+ 0 - 1
biz/shop/classes/ShopAdminClass.php

@@ -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 {