|
|
@@ -812,14 +812,21 @@ class DeepSeekService
|
|
|
$script_id = getProp($data, 'script_id');
|
|
|
$script = DB::table('mp_scripts')->where('id', $script_id)->where('is_deleted', 0)
|
|
|
->selectRaw('id as script_id, script_name, intro, highlights, roles, role_relationship, core_contradiction, art_style, scenes, status, start_episode_sequence, end_episode_sequence, episode_num, remark, created_at')->first();
|
|
|
- if (!!$script) Utils::throwError('20003:该剧本不存在!');
|
|
|
+ if (!$script) Utils::throwError('20003:该剧本不存在!');
|
|
|
$script = (array)$script;
|
|
|
+ $status_arr =[
|
|
|
+ '1' => '待创作',
|
|
|
+ '2' => '解析中',
|
|
|
+ '3' => '解析完成',
|
|
|
+ '4' => '解析失败',
|
|
|
+ ];
|
|
|
+ $script['status_info'] = isset($status_arr[$script['status']]) ? $status_arr[$script['status']] : '';
|
|
|
$script['roles'] = json_decode($script['roles']);
|
|
|
$script['scenes'] = json_decode($script['scenes']);
|
|
|
|
|
|
// 获取分集信息
|
|
|
$episodes = DB::table('mp_script_episodes')->where('script_id', $script_id)->orderBy('episode_number')
|
|
|
- ->select('script_id', 'episode_number', 'title', 'content')
|
|
|
+ ->select('id', 'episode_number', 'title', 'content')
|
|
|
->get()->map(function ($value) {
|
|
|
return (array)$value;
|
|
|
})->toArray();
|