mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 04:08:43 +08:00 
			
		
		
		
	mall:完善商品品牌的前后端实现
This commit is contained in:
		@@ -24,64 +24,6 @@ SET NAMES utf8mb4;
 | 
			
		||||
-- ----------------------------
 | 
			
		||||
-- Table structure for product_brand
 | 
			
		||||
-- ----------------------------
 | 
			
		||||
DROP TABLE IF EXISTS `product_brand`;
 | 
			
		||||
CREATE TABLE `product_brand`
 | 
			
		||||
(
 | 
			
		||||
    `id`          bigint       NOT NULL AUTO_INCREMENT COMMENT '品牌编号',
 | 
			
		||||
    `category_id` bigint       NOT NULL COMMENT '分类编号',
 | 
			
		||||
    `name`        varchar(255) NOT NULL COMMENT '品牌名称',
 | 
			
		||||
    `banner_url`  varchar(255) NOT NULL COMMENT '品牌图片',
 | 
			
		||||
    `sort`        int                   DEFAULT '0' COMMENT '品牌排序',
 | 
			
		||||
    `description` varchar(1024)         DEFAULT NULL COMMENT '品牌描述',
 | 
			
		||||
    `status`      tinyint      NOT NULL COMMENT '状态',
 | 
			
		||||
    `creator`     varchar(64)           DEFAULT '' COMMENT '创建者',
 | 
			
		||||
    `create_time` datetime     NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
 | 
			
		||||
    `updater`     varchar(64)           DEFAULT '' COMMENT '更新者',
 | 
			
		||||
    `update_time` datetime     NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
 | 
			
		||||
    `deleted`     bit(1)       NOT NULL DEFAULT b'0' COMMENT '是否删除',
 | 
			
		||||
    `tenant_id`   bigint       NOT NULL DEFAULT '0' COMMENT '租户编号',
 | 
			
		||||
    PRIMARY KEY (`id`) USING BTREE
 | 
			
		||||
) 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);
 | 
			
		||||
-- 商品分类 菜单 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);
 | 
			
		||||
-- 按钮父菜单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);
 | 
			
		||||
 | 
			
		||||
-- 品牌管理 菜单 SQL
 | 
			
		||||
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);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-- ----------------------------
 | 
			
		||||
-- Table structure for market_activity
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user