lh 1 週間 前
コミット
59b76b1e41
1 ファイル変更3 行追加1 行削除
  1. 3 1
      app/Services/PromptTemplate/PromptTemplateService.php

+ 3 - 1
app/Services/PromptTemplate/PromptTemplateService.php

@@ -46,8 +46,10 @@ class PromptTemplateService
         } elseif ($publicType == 1) {
             // 公共库:user_id 为 0
             $query->where('user_id', 0);
+        }elseif ($publicType == 2) {
+            // public_type == 2 时不添加 user_id 条件,返回所有库
+            $query->whereIn('user_id', [$uid, 0]);
         }
-        // public_type == 2 时不添加 user_id 条件,返回所有库
 
         // 模板ID精确查询
         if (!empty($templateId)) {