lh 2 mesiacov pred
rodič
commit
6eec8c6782
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 3 0
      app/Services/DeepSeek/DeepSeekService.php

+ 3 - 0
app/Services/DeepSeek/DeepSeekService.php

@@ -1473,6 +1473,9 @@ class DeepSeekService
             Utils::throwError('20003:该模型不存在!');
         }
 
+        $exists_sequence_arr = DB::table('mp_script_episodes')->where('script_id', $script_id)->whereBetween('episode_number', [$start_episode_sequence, $end_episode_sequence])->pluck('episode_number')->toArray();
+        if ($exists_sequence_arr) Utils::throwError('20003:剧集 '.implode('、', $exists_sequence_arr).' 已存在,不得创建!');
+
         // 模型兼容性处理:deepseek-chat 和 deepseek-reasoner 映射到 deepseek-v4-flash
         $thinkingMode = getProp($data, 'thinking', 'disabled'); // 默认非思考模式
         $reasoningEffort = getProp($data, 'reasoning_effort', 'high'); // 默认思考强度