批量更新功能

This commit is contained in:
2026-09-14 16:15:44 +08:00
parent 6f106e43af
commit a26c98b92b
79 changed files with 4529 additions and 724 deletions
+21
View File
@@ -0,0 +1,21 @@
-- =============================================================
-- Project contacts: pick contacts from the linked companies
-- (a project no longer shows ALL contacts of the customer)
-- Table: yz_backend_crm_project
-- 1) upstream_contact_ids : JSON array of contact IDs picked from
-- the customer's address book (upstream).
-- 2) downstream_contact_ids : JSON array of contact IDs picked from
-- the counterpart's address book
-- (downstream for type=2 / midstream for type=3).
-- Contact details always come from yz_backend_erp_contact in real time;
-- only the picked ID references are stored here. Empty array -> ''.
-- Run: mysql -h<host> -P<port> -u<user> -p <db> < alter_project_contacts.sql
-- (re-running only reports "Duplicate column name", which is safe)
-- NOTE: keep this file ASCII-only; piping through some shells mangles non-ASCII.
-- =============================================================
ALTER TABLE `yz_backend_crm_project`
ADD COLUMN `upstream_contact_ids` TEXT NULL COMMENT 'picked contact IDs (JSON array) from customer address book' AFTER `downstream_phone`;
ALTER TABLE `yz_backend_crm_project`
ADD COLUMN `downstream_contact_ids` TEXT NULL COMMENT 'picked contact IDs (JSON array) from counterpart address book (downstream/midstream)' AFTER `upstream_contact_ids`;