admin/sql/migrate_sales_product_group_wms.sql
zzh b7be742046
All checks were successful
Build and Deploy / deploy (push) Successful in 4m34s
feat: 店铺订单支持仓储代发(wms)建单,放宽创建状态限制
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 15:39:31 +08:00

25 lines
835 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 销售产品分组字典:仓储代发(wms)。可重复执行。
-- 用于店铺订单「创建代发订单」选品过滤;销售产品 ProductGroup 填 wms。
SET @db := DATABASE();
-- 确保字典类型存在
INSERT INTO `t_dict_type` (`DictType`, `Remark`, `TypeSort`, `IsDeleted`, `CreateUserId`)
SELECT 'sales_product_group', '销售产品分组', 0, 0, 0
FROM DUAL
WHERE NOT EXISTS (
SELECT 1 FROM `t_dict_type`
WHERE `DictType` = 'sales_product_group' AND `IsDeleted` = 0
);
-- 写入 wms 字典项
INSERT INTO `t_dict` (`DictType`, `DictSort`, `DictCode`, `DictName`, `IsDeleted`, `CreateUserId`)
SELECT 'sales_product_group', 90, 'wms', '仓储代发', 0, 0
FROM DUAL
WHERE NOT EXISTS (
SELECT 1 FROM `t_dict`
WHERE `DictType` = 'sales_product_group'
AND `DictCode` = 'wms'
AND `IsDeleted` = 0
);