作者 赵彬吉

update

... ... @@ -98,9 +98,10 @@ class KeywordPageAiContent extends Command
public function ai_content(ProjectKeywordAiTask $task)
{
//前后缀
$default_affix = AggregateKeywordAffix::where('project_id', 0)->first();
$affix = AggregateKeywordAffix::where('project_id', $task->project_id)->first();
$prefix = empty($affix['prefix']) ? [] : explode("\r\n", $affix['prefix']);
$suffix = empty($affix['suffix']) ? [] : explode("\r\n", $affix['suffix']);
$prefix = empty($affix['prefix']) ? explode("\r\n", $default_affix['prefix']) : explode("\r\n", $affix['prefix']);
$suffix = empty($affix['suffix']) ? explode("\r\n", $default_affix['suffix']) : explode("\r\n", $affix['suffix']);
if (!$prefix || !$suffix) {
throw new ValidateException('扩展标题前后缀不存在');
}
... ...