feat(enterprise-site): add PbootCMS enterprise site publisher
Introduce a new enterprise-site publishing channel that lets tenants push articles to self-hosted PbootCMS sites alongside the existing media supply flow. Backend (server/internal/tenant): - enterprise_site_service: CRUD, ping, category sync, and article publish - enterprise_site_pbootcms: PbootCMS API client integration - enterprise_site_crypto: encrypt/decrypt stored site credentials - enterprise_site_handler + routes under /enterprise-sites - migrations for the enterprise site publisher tables - config: add SERVER_PUBLIC_BASE_URL (Server.PublicBaseURL) for callbacks - article/media services adjusted to support the publish flow Frontend (apps/admin-web): - PublishArticleModal & ArticlePublishStatus: enterprise-site publish UI - MediaView: manage enterprise sites and categories - api + shared-types: enterprise site endpoints and types - http-client: add PATCH method support Integrations: - pbootcms GeoPublisher controller plugin + install guide - docs/enterprise-site-publisher-v1.md design doc
This commit is contained in:
@@ -110,7 +110,10 @@ const articlePublishStatusAggregateJoin = `
|
||||
BOOL_OR(latest.status_bucket = 'success') AS has_success,
|
||||
BOOL_OR(latest.status_bucket = 'failed') AS has_failed
|
||||
FROM (
|
||||
SELECT DISTINCT ON (pr.platform_account_id)
|
||||
SELECT DISTINCT ON (
|
||||
COALESCE(pr.target_type, 'platform_account'),
|
||||
COALESCE(pr.platform_account_id, pr.target_connection_id)
|
||||
)
|
||||
CASE
|
||||
WHEN pr.status IN ('success', 'published', 'publish_success') THEN 'success'
|
||||
WHEN pr.status IN ('publishing', 'pending', 'queued', 'running') THEN 'publishing'
|
||||
@@ -119,7 +122,11 @@ const articlePublishStatusAggregateJoin = `
|
||||
FROM publish_records pr
|
||||
WHERE pr.tenant_id = a.tenant_id
|
||||
AND pr.article_id = a.id
|
||||
ORDER BY pr.platform_account_id, pr.created_at DESC, pr.id DESC
|
||||
ORDER BY
|
||||
COALESCE(pr.target_type, 'platform_account'),
|
||||
COALESCE(pr.platform_account_id, pr.target_connection_id),
|
||||
pr.created_at DESC,
|
||||
pr.id DESC
|
||||
) latest
|
||||
) publish_status_summary ON true`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user