mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-07-06 18:42:48 +08:00
feat(post-output): add save-only and load-history endpoints
This commit is contained in:
@@ -212,4 +212,23 @@ class PhoneImage implements PostOutputManagerInterface
|
||||
'page_count' => $pageCount,
|
||||
]) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 仅保存配置(不生成图片),创建新的历史记录
|
||||
* @param int $postId 文章ID
|
||||
* @param array $config 配置(含 size/fontSize/watermark/pageAlignments/content_html)
|
||||
* @param int $adminId 管理员ID
|
||||
* @return PostOutput
|
||||
*/
|
||||
public static function saveConfigOnly(int $postId, array $config, int $adminId): PostOutput
|
||||
{
|
||||
return PostOutput::create([
|
||||
'post_id' => $postId,
|
||||
'output_type' => 'phone_image',
|
||||
'config' => $config,
|
||||
'status' => PostOutput::STATUS_PROCESSING,
|
||||
'page_count' => 0,
|
||||
'admin_id' => $adminId,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user