admin/sql/seed_order_template_dedicated_small_parcel.sql
zzh 9ab112a36e feat(order): 下单模板映射与 Excel 批量导入小包创建
新增专线小包标准模板生成、自定义列映射 API,并将 /order/upload 改为按映射解析 Excel 后走 CreateParcelCoreAsync;列表查询时自动补齐标准模板种子数据。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 16:42:22 +08:00

21 lines
510 B
SQL

-- 标准模板:专线小包模板
INSERT INTO `t_order_template` (
`Name`, `Type`, `TemplateKey`, `StandardTemplateKey`, `MappingStatus`,
`CustomerId`, `IsDeleted`, `CreateUserId`, `CreateTime`
)
SELECT
'专线小包模板',
'standard',
'dedicated_small_parcel_v1',
'dedicated_small_parcel_v1',
'ready',
NULL,
0,
0,
NOW()
FROM DUAL
WHERE NOT EXISTS (
SELECT 1 FROM `t_order_template`
WHERE `Type` = 'standard' AND `TemplateKey` = 'dedicated_small_parcel_v1' AND `IsDeleted` = 0
);