All checks were successful
Build and Deploy / deploy (push) Successful in 4m34s
Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
835 B
SQL
25 lines
835 B
SQL
-- 销售产品分组字典:仓储代发(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
|
||
);
|