feat(media-supply): add media resource supply marketplace
Desktop Client Build / Resolve Build Metadata (push) Successful in 43s
Frontend CI / Frontend (push) Successful in 3m49s
Backend CI / Backend (push) Failing after 7m10s
Desktop Client Build / Build Desktop Client (push) Successful in 23m4s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 28s

Introduce an end-to-end media-supply feature: tenant-side resource sync
service/worker backed by a Meijiequan supplier client, ops-side management
APIs, and admin/ops web views for resources, orders, favorites and
submission. Adds a shared digitocr helper, MediaSupply config blocks for
tenant and ops, shared types, and migrations for supplier media resources,
price overrides, customer visibility and order refunds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-29 23:17:01 +08:00
parent 607a3fffe7
commit 9d6181260a
121 changed files with 14909 additions and 36 deletions
@@ -0,0 +1,17 @@
ALTER TABLE supplier_media_resources
ADD COLUMN IF NOT EXISTS resource_url TEXT,
ADD COLUMN IF NOT EXISTS baidu_weight INT,
ADD COLUMN IF NOT EXISTS resource_remark TEXT;
UPDATE supplier_media_resources
SET resource_url = NULLIF(BTRIM(COALESCE(raw_json->>'meitianli', raw_json->>'resource_url', raw_json->>'url', raw_json->>'site_url', raw_json->>'link')), ''),
baidu_weight = CASE
WHEN BTRIM(COALESCE(raw_json->>'meitiquanzhong', raw_json->>'baidu_weight', raw_json->>'weight', raw_json->>'quanzhong')) ~ '^[0-9]+$'
THEN BTRIM(COALESCE(raw_json->>'meitiquanzhong', raw_json->>'baidu_weight', raw_json->>'weight', raw_json->>'quanzhong'))::INT
ELSE NULL
END,
resource_remark = NULLIF(BTRIM(COALESCE(raw_json->>'meitibeizhu', raw_json->>'remark', raw_json->>'beizhu', raw_json->>'note', raw_json->>'description')), '')
WHERE resource_url IS NULL OR baidu_weight IS NULL OR resource_remark IS NULL;
CREATE INDEX IF NOT EXISTS idx_supplier_media_resources_remark
ON supplier_media_resources (supplier, resource_remark);