shish hace 4 años
padre
commit
ad2d9c97c1
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      biz-ghs/shop/services/ShopAdminService.php

+ 4 - 4
biz-ghs/shop/services/ShopAdminService.php

@@ -37,15 +37,11 @@ class ShopAdminService extends BaseService
     public static function appGenerateStaff($data, $admin)
     {
         $mobile = $data['mobile'] ?? '';
-        $adminId = $data['adminId'] ?? 0;
         $shopId = $data['shopId'] ?? 0;
         $name = $data['name'] ?? '未命名';
-        $avatar = $admin['avatar'] ?? '';
-
         $remark = isset($data['remark']) ? $data['remark'] : '';
         $status = 1;
         $remind = isset($data['remind']) ? $data['remind'] : 0;
-
         $roleId = $data['roleId'] ?? 0;
         $role = AdminRoleClass::getById($roleId);
         if (empty($role)) {
@@ -56,6 +52,10 @@ class ShopAdminService extends BaseService
             util::fail('没有找到门店');
         }
         $sjName = $shop['merchantName'] ?? '';
+
+        $avatar = $admin['avatar'] ?? '';
+        $adminId = $admin['id'] ?? 0;
+
         sms::freeSend($mobile . ',' . $sjName, '欢迎加入{$var}大家庭');
         $sjId = $shop['sjId'] ?? 0;
         $shopAdmin = ShopAdminClass::getByCondition(['shopId' => $shopId, 'adminId' => $adminId], true);