Browse Source

fixed:用户端-申请技师(技师默认状态为待审核)

刘学玺 4 months ago
parent
commit
616494a87c
1 changed files with 6 additions and 4 deletions
  1. 6 4
      app/Services/Client/UserService.php

+ 6 - 4
app/Services/Client/UserService.php

@@ -3,6 +3,7 @@
 namespace App\Services\Client;
 
 use App\Enums\TechnicianAuthStatus;
+use App\Enums\TechnicianStatus;
 use App\Models\CoachInfoRecord;
 use App\Models\MemberUser;
 use Illuminate\Support\Facades\Auth;
@@ -303,7 +304,7 @@ class UserService
      * 业务逻辑:
      * 1. 获取用户关联的技师信息
      * 2. 如果存在技师信息:
-     *    - 验证现申请状态
+     *    - 验证现申请状态
      *    - 更新基础信息
      * 3. 如果不存在技师信息:
      *    - 创建新的技师记录
@@ -335,6 +336,7 @@ class UserService
         return $user->coach()->create([
             'mobile' => $mobile,
             'gender' => $gender,
+            'state' => TechnicianStatus::PENDING->value,
         ]);
     }
 
@@ -455,9 +457,9 @@ class UserService
      * 生成用户邀请码
      *
      * 业务逻辑:
-     * 1. 获取当前户信息
+     * 1. 获取当前户信息
      * 2. 根据用户类型生成邀请码
-     * 3. 生成包含邀请参数的
+     * 3. 生成包含邀请参数的接
      * 4. 生成邀请二维码
      * 5. 记录邀请码生成日志
      *
@@ -519,7 +521,7 @@ class UserService
      *
      * 业务逻辑:
      * 1. 根据类型判断邀请人身份
-     * 2. 用户类型:直接返回用���信息
+     * 2. 用户类型:直接返回用信息
      * 3. 技师类型:
      *    - 验证技师状态
      *    - 返回技师信息