feat(tenant/articles): aggregate publish status from per-account records
a.publish_status only stored a coarse summary so the article list/detail mis-reported as 失败 when one of several accounts failed. Compute the effective status via a LATERAL join over latest publish_records per platform_account_id and bucket into success / publishing / failed / partial_success. Wire the same expression into list filtering and detail queries, and let normalizePublishStatus / batch-status helpers retain partial_success end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -154,6 +154,8 @@ func normalizePublishStatus(status string) string {
|
||||
switch status {
|
||||
case "success", "published", "publish_success":
|
||||
return "success"
|
||||
case "partial_success":
|
||||
return "partial_success"
|
||||
case "publishing", "pending", "queued", "running":
|
||||
return "publishing"
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user