作者 赵彬吉

fix

... ... @@ -100,8 +100,15 @@ class KeywordPageAiContent extends Command
//前后缀
$default_affix = AggregateKeywordAffix::where('project_id', 0)->first();
$affix = AggregateKeywordAffix::where('project_id', $task->project_id)->first();
$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']);
$default_affix['prefix'] = str_replace("\r\n", "\n", $default_affix['prefix']);
$default_affix['suffix'] = str_replace("\r\n", "\n", $default_affix['suffix']);
$affix['prefix'] = str_replace("\r\n", "\n", $affix['prefix']);
$affix['prefix'] = str_replace("\r\n", "\n", $affix['prefix']);
$prefix = empty($affix['prefix']) ? explode("\n", $default_affix['prefix']) : explode("\n", $affix['prefix']);
$suffix = empty($affix['suffix']) ? explode("\n", $default_affix['suffix']) : explode("\n", $affix['suffix']);
if (!$prefix || !$suffix) {
throw new ValidateException('扩展标题前后缀不存在');
}
... ...