feat: Enhance API path handling and normalize company industry names

This commit is contained in:
2026-07-03 13:19:47 +08:00
parent 0024f81484
commit 23b60904e4
4 changed files with 113 additions and 10 deletions

View File

@@ -0,0 +1,36 @@
-- Normalize company industry names used by the dashboard industry analysis.
-- The backend treats these three names as the canonical categories:
-- 食品加工、纺织服装、装备制造
UPDATE company
SET industry = '食品加工'
WHERE del_flag = '0'
AND industry IS NOT NULL
AND (
industry IN ('食品产业', '食品加工', '绿色有机食品', '食品/饮料/酒水')
OR industry LIKE '%食品%'
OR industry LIKE '%饮料%'
OR industry LIKE '%酒%'
);
UPDATE company
SET industry = '纺织服装'
WHERE del_flag = '0'
AND industry IS NOT NULL
AND (
industry = '纺织服装'
OR industry LIKE '%纺织%'
OR industry LIKE '%服装%'
);
UPDATE company
SET industry = '装备制造'
WHERE del_flag = '0'
AND industry IS NOT NULL
AND (
industry = '装备制造'
OR industry LIKE '%装备%'
OR industry LIKE '%制造%'
OR industry LIKE '%机械%'
OR industry LIKE '%设备%'
);