feat: 添加部门成员同步功能

- 在 UsersController 中新增同步部门成员的 API 接口
- 在 UserDepartment 模型中添加递归获取子部门 ID 的方法
- 在前端 TeamManagement 组件中添加同步部门成员的操作选项
This commit is contained in:
kuaifan
2025-09-22 05:07:45 +08:00
parent 02e56f87bc
commit b044d8d90e
4 changed files with 151 additions and 4 deletions

View File

@@ -189,7 +189,7 @@ class AI
$result = Cache::remember($cacheKey, Carbon::now()->addDays(7), function () use ($text, $targetLanguage) {
$post = json_encode([
"model" => "gpt-4.1-nano",
"model" => "gpt-5-nano",
"messages" => [
[
"role" => "system",
@@ -264,7 +264,7 @@ class AI
$result = Cache::remember($cacheKey, Carbon::now()->addHours(24), function () use ($text) {
$post = json_encode([
"model" => "gpt-4.1-nano",
"model" => "gpt-5-nano",
"messages" => [
[
"role" => "system",
@@ -333,7 +333,7 @@ class AI
$result = Cache::remember($cacheKey, Carbon::now()->addHours(6), function () {
$post = json_encode([
"model" => "gpt-4.1-nano",
"model" => "gpt-5-nano",
"messages" => [
[
"role" => "system",