规格和商品菜单提交
parent
a86cbde090
commit
0b087c84c6
83
sql/mall.sql
83
sql/mall.sql
|
@ -63,35 +63,50 @@ CREATE TABLE `product_brand`
|
|||
) ENGINE=InnoDB COMMENT='品牌';
|
||||
|
||||
-- TODO 父级菜单的 id 处理: 2000 、 2001
|
||||
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES (2000, '商城', '', 1, 1, 0, '/mall', 'merchant', NULL, 0);
|
||||
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES (2001, '商品管理', '', 1, 1, 2000, 'product', 'dict', NULL, 0);
|
||||
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES (2000, '商城', '', 1, 1, 0, '/mall', 'merchant', NULL, 0);
|
||||
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES (2001, '商品', '', 1, 1, 2000, 'product', 'dict', NULL, 0);
|
||||
-- 商品分类 菜单 SQL
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('商品分类管理', '', 2, 0, 2001, 'category', '', 'mall/product/category/index', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('分类管理', '', 2, 0, 2001, 'category', '', 'mall/product/category/index', 0);
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
-- 按钮 SQL
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('商品分类查询', 'product:category:query', 3, 1, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('商品分类创建', 'product:category:create', 3, 2, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('商品分类更新', 'product:category:update', 3, 3, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('商品分类删除', 'product:category:delete', 3, 4, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('商品分类导出', 'product:category:export', 3, 5, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('分类查询', 'product:category:query', 3, 1, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('分类创建', 'product:category:create', 3, 2, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('分类更新', 'product:category:update', 3, 3, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('分类删除', 'product:category:delete', 3, 4, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('分类导出', 'product:category:export', 3, 5, @parentId, '', '', '', 0);
|
||||
-- 品牌管理 菜单 SQL
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('品牌管理', '', 2, 0, 2001, 'brand', '', 'mall/product/brand/index', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('品牌管理', '', 2, 1, 2001, 'brand', '', 'mall/product/brand/index', 0);
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
-- 按钮 SQL
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('品牌查询', 'product:brand:query', 3, 1, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('品牌创建', 'product:brand:create', 3, 2, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('品牌更新', 'product:brand:update', 3, 3, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('品牌删除', 'product:brand:delete', 3, 4, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`) VALUES ('品牌导出', 'product:brand:export', 3, 5, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('品牌查询', 'product:brand:query', 3, 1, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('品牌创建', 'product:brand:create', 3, 2, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('品牌更新', 'product:brand:update', 3, 3, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('品牌删除', 'product:brand:delete', 3, 4, @parentId, '', '', '', 0);
|
||||
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
|
||||
VALUES ('品牌导出', 'product:brand:export', 3, 5, @parentId, '', '', '', 0);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for market_activity
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `market_activity`;
|
||||
CREATE TABLE `market_activity` (
|
||||
CREATE TABLE `market_activity`
|
||||
(
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '活动编号',
|
||||
`title` varchar(50) NOT NULL DEFAULT '' COMMENT '活动标题',
|
||||
`activity_type` tinyint(4) NOT NULL COMMENT '活动类型',
|
||||
|
@ -112,6 +127,44 @@ CREATE TABLE `market_activity` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='促销活动';
|
||||
|
||||
|
||||
-- 规格菜单 SQL
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('规格管理', '', 2, 3, 2001, 'property', '', 'product/property/index', 0);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('规格查询', 'product:property:query', 3, 1, @parentId, '', '', '', 0);
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('规格创建', 'product:property:create', 3, 2, @parentId, '', '', '', 0);
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('规格更新', 'product:property:update', 3, 3, @parentId, '', '', '', 0);
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('规格删除', 'product:property:delete', 3, 4, @parentId, '', '', '', 0);
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('规格导出', 'product:property:export', 3, 5, @parentId, '', '', '', 0);
|
||||
|
||||
|
||||
-- 商品菜单 SQL
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('商品管理', '', 2, 2, 2001, 'spu', '', 'product/spu/index', 0);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('商品查询', 'product:spu:query', 3, 1, @parentId, '', '', '', 0);
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('商品创建', 'product:spu:create', 3, 2, @parentId, '', '', '', 0);
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('商品更新', 'product:spu:update', 3, 3, @parentId, '', '', '', 0);
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('商品删除', 'product:spu:delete', 3, 4, @parentId, '', '', '', 0);
|
||||
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
|
||||
VALUES ('商品导出', 'product:spu:export', 3, 5, @parentId, '', '', '', 0);
|
||||
|
||||
|
||||
-- 规格名称表
|
||||
|
|
Loading…
Reference in New Issue