feat(tenant): add brand publish-records list and harden enterprise site management
- Add GET /api/tenant/publish-records: brand-scoped paginated list that merges in-flight (queued/publishing) records ahead of history (success/failed/cancelled), enriched with article title and latest desktop task id; wire up service/handler/router/swagger/router_test - Rework PublishManagementView to consume publish-records instead of desktop publish tasks; add publishRecordsApi + shared-types (ListPublishRecordsParams, PublishRecordListResponse) - Enterprise site Update: distinguish explicit null from missing PATCH fields via EnterpriseSitePatchString, dedup site_url before write, verify RowsAffected, and map unique-constraint violations to a clear conflict - MediaView: enterprise site edit/delete flows with favicon fallback handling - Localize enterprise site / PBootCMS error messages to Chinese across the backend and the admin-web error map, plus legacy raw-message translation - deploy: gate migration-coupled service rollouts behind RUN_MIGRATIONS unless ALLOW_SKIP_MIGRATIONS_FOR_APP_ROLLOUT=true; handle empty SERVICES safely Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1262,8 +1262,10 @@ export interface PublishRecord {
|
||||
id: number
|
||||
publish_batch_id: number
|
||||
article_id: number
|
||||
article_title?: string | null
|
||||
platform_account_id?: number | null
|
||||
desktop_account_id: string | null
|
||||
desktop_task_id?: string | null
|
||||
target_type?: 'platform_account' | 'enterprise_site' | string
|
||||
target_connection_id?: number | null
|
||||
platform_id: string
|
||||
@@ -1279,6 +1281,21 @@ export interface PublishRecord {
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface ListPublishRecordsParams {
|
||||
page?: number
|
||||
page_size?: number
|
||||
title?: string
|
||||
}
|
||||
|
||||
export interface PublishRecordListResponse {
|
||||
items: PublishRecord[]
|
||||
page: number
|
||||
page_size: number
|
||||
total: number
|
||||
pending_count: number
|
||||
history_total: number
|
||||
}
|
||||
|
||||
export type EnterpriseSiteCmsType = 'pbootcms' | 'wordpress' | 'dedecms' | 'phpcms'
|
||||
export type EnterpriseSiteStatus = 'draft' | 'connected' | 'error' | 'disabled'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user