加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
legou_rbac_fixed.sql 29.71 KB
一键复制 编辑 原始数据 按行查看 历史
Colorado 提交于 2016-03-01 17:02 . 订单管理和权限管理添加
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
DROP SCHEMA IF EXISTS `legou` ;
CREATE SCHEMA IF NOT EXISTS `legou` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
USE `legou` ;
-- -----------------------------------------------------
-- Table `legou`.`legou_user`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_user` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_user` (
`uid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户id主键',
`username` CHAR(20) NOT NULL DEFAULT '' COMMENT '用户名',
`password` CHAR(32) NOT NULL DEFAULT '' COMMENT '用户登录密码',
`email` VARCHAR(100) NOT NULL DEFAULT '' COMMENT '用户绑定的邮箱',
PRIMARY KEY (`uid`),
UNIQUE INDEX `username_UNIQUE` (`username` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '用户表';
-- -----------------------------------------------------
-- Table `legou`.`legou_admin`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_admin` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_admin` (
`aid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '管理员ID',
`username` CHAR(20) NOT NULL DEFAULT '' COMMENT '登录账号',
`relname` CHAR(20) NOT NULL DEFAULT '' COMMENT '管理员用户名',
`password` CHAR(32) NOT NULL DEFAULT '' COMMENT '管理员密码',
`logintime` INT(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '登录时间',
`ip` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '登录ip',
PRIMARY KEY (`aid`))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '管理员表 ';
-- -----------------------------------------------------
-- Table `legou`.`legou_type`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_type` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_type` (
`tid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '类型表自增ID',
`tname` CHAR(50) NOT NULL DEFAULT '' COMMENT '类型名称',
`state` VARCHAR(200) NOT NULL DEFAULT '' COMMENT '分类说明',
`addtime` INT(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '分类添加时间',
PRIMARY KEY (`tid`))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = 'type类型表';
-- -----------------------------------------------------
-- Table `legou`.`legou_category`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_category` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_category` (
`cid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '分类表自增ID',
`cname` CHAR(50) NOT NULL DEFAULT '' COMMENT '分类名称',
`pid` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '父级ID',
`csort` INT UNSIGNED NOT NULL DEFAULT 1000 COMMENT '分类排序,默认1000最低',
`addtime` INT(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '分类添加时间',
`type_tid` INT UNSIGNED NOT NULL,
PRIMARY KEY (`cid`),
INDEX `fk_category_type1_idx` (`type_tid` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '分类表';
-- -----------------------------------------------------
-- Table `legou`.`legou_attribute`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_attribute` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_attribute` (
`atid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '类型属性表自增ID',
`atname` CHAR(50) NOT NULL DEFAULT '' COMMENT '类型属性名',
`atvalue` VARCHAR(200) NOT NULL DEFAULT '' COMMENT '属性值',
`class` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '属性类型,用于判断是否可选',
`type_tid` INT UNSIGNED NOT NULL,
PRIMARY KEY (`atid`),
INDEX `fk_attribute_type1_idx` (`type_tid` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '类型属性表';
-- -----------------------------------------------------
-- Table `legou`.`legou_brand`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_brand` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_brand` (
`bid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '品牌ID自增主键',
`bname` CHAR(50) NOT NULL DEFAULT '' COMMENT '品牌名称',
`logo` VARCHAR(200) NOT NULL DEFAULT '' COMMENT 'logo的保存地址',
`bsort` INT UNSIGNED NOT NULL DEFAULT 1000 COMMENT '品牌排序,数字越大,排序越低',
`hot` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否热门,0为不热门,1为热门',
PRIMARY KEY (`bid`))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '品牌数据表';
-- -----------------------------------------------------
-- Table `legou`.`legou_goods`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_goods` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_goods` (
`gid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '商品id',
`gname` CHAR(200) NOT NULL DEFAULT '' COMMENT '商品名',
`gnumber` CHAR(100) NOT NULL DEFAULT '' COMMENT '货号',
`unit` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '计量单位',
`mprice` INT UNSIGNED NOT NULL DEFAULT 999999 COMMENT '市场价',
`sprice` INT UNSIGNED NOT NULL DEFAULT 999998 COMMENT '商城价',
`inventory` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '总库存',
`listpic` VARCHAR(200) NOT NULL DEFAULT '' COMMENT '列表图保存地址',
`click` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '点击次数',
`addtime` INT(10) UNSIGNED ZEROFILL NOT NULL DEFAULT 0 COMMENT '商品上架时间',
`brand_bid` INT UNSIGNED NOT NULL,
`category_cid` INT UNSIGNED NOT NULL,
`admin_aid` INT UNSIGNED NOT NULL,
`type_tid` INT UNSIGNED NOT NULL,
PRIMARY KEY (`gid`),
INDEX `fk_goods_brand1_idx` (`brand_bid` ASC),
INDEX `fk_goods_category1_idx` (`category_cid` ASC),
INDEX `fk_goods_admin1_idx` (`admin_aid` ASC),
INDEX `fk_goods_type1_idx` (`type_tid` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '商品表';
-- -----------------------------------------------------
-- Table `legou`.`legou_gdetail`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_gdetail` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_gdetail` (
`gdid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '商品详细id',
`mini` TEXT NULL COMMENT '中图地址',
`medium` TEXT NULL,
`big` TEXT NULL COMMENT '大图地址',
`content` TEXT NULL COMMENT '商品详细',
`service` TEXT NULL COMMENT '售后服务',
`goods_gid` INT UNSIGNED NOT NULL,
PRIMARY KEY (`gdid`),
INDEX `fk_gdetail_goods1_idx` (`goods_gid` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '商品详细表';
-- -----------------------------------------------------
-- Table `legou`.`legou_gattr`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_gattr` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_gattr` (
`gaid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '商品属性id自增',
`gavalue` CHAR(100) NOT NULL DEFAULT '' COMMENT '商品属性值',
`addprice` INT NOT NULL DEFAULT 0 COMMENT '附加价格',
`attribute_atid` INT UNSIGNED NOT NULL,
`goods_gid` INT UNSIGNED NOT NULL,
PRIMARY KEY (`gaid`),
INDEX `fk_gattr_attribute1_idx` (`attribute_atid` ASC),
INDEX `fk_gattr_goods1_idx` (`goods_gid` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '商品属性';
-- -----------------------------------------------------
-- Table `legou`.`legou_glist`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_glist` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_glist` (
`glid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '货品列表id',
`combine` CHAR(45) NOT NULL DEFAULT '' COMMENT '组合属性id',
`inventory` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '库存',
`itemno` CHAR(20) NOT NULL DEFAULT '' COMMENT '商品货号',
`goods_gid` INT UNSIGNED NOT NULL,
PRIMARY KEY (`glid`),
INDEX `fk_glist_goods1_idx` (`goods_gid` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '货品列表';
-- -----------------------------------------------------
-- Table `legou`.`legou_orders`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_orders` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_orders` (
`oid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '订单id',
`onumber` CHAR(20) NOT NULL DEFAULT '' COMMENT '订单号',
`consignee` VARCHAR(45) NOT NULL DEFAULT '' COMMENT '收货人',
`address` TEXT NULL COMMENT '收货人地址',
`total` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '价格总计',
`time` INT(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单生成时间',
`remarks` TEXT NULL COMMENT '备注留言',
`status` INT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单状态:1.待付款,2.已付款,3.待发货,4.待收货,5.待评价,6.订单完成',
`user_uid` INT UNSIGNED NOT NULL,
PRIMARY KEY (`oid`),
INDEX `fk_order_user1_idx` (`user_uid` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '订单表';
-- -----------------------------------------------------
-- Table `legou`.`legou_address`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_address` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_address` (
`adid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户地址id',
`province` CHAR(20) NOT NULL DEFAULT '' COMMENT '省',
`city` CHAR(50) NOT NULL DEFAULT '' COMMENT '市',
`district` CHAR(50) NOT NULL DEFAULT '' COMMENT '区',
`detail` TEXT NULL COMMENT '详细地址',
`consignee` VARCHAR(45) NOT NULL DEFAULT '' COMMENT '收货人',
`tel` char(11) NOT NULL DEFAULT '' COMMENT '收货人手机',
`index` INT(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '默认地址:1.选为默认地址,0.非默认地址',
`user_uid` INT UNSIGNED NOT NULL,
PRIMARY KEY (`adid`),
INDEX `fk_address_user1_idx` (`user_uid` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '用户地址表';
-- -----------------------------------------------------
-- Table `legou`.`legou_orderlist`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_orderlist` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_orderlist` (
`olid` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '订单列表id',
`number` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '购买数量',
`subtotal` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '价格小计',
`remarks` TEXT NULL COMMENT '备注说明',
`goods_gid` INT UNSIGNED NOT NULL,
`order_oid` INT UNSIGNED NOT NULL,
PRIMARY KEY (`olid`),
INDEX `fk_orderlist_goods1_idx` (`goods_gid` ASC),
INDEX `fk_orderlist_order1_idx` (`order_oid` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '订单列表';
-- -----------------------------------------------------
-- Table `legou`.`legou_userinfor`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_userinfor` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_userinfor` (
`uiid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`points` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户积分',
`sex` ENUM('男','女') NULL DEFAULT '女' COMMENT '性别',
`birthyear` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '出生年',
`birthmonth` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '出生月',
`birthday` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '出生日',
`province` VARCHAR(45) NOT NULL DEFAULT '' COMMENT '省',
`city` VARCHAR(145) NOT NULL DEFAULT '' COMMENT '市',
`district` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '区',
`detail` TEXT NULL COMMENT '详细地址',
`postcode` CHAR(6) NOT NULL DEFAULT '' COMMENT '邮编',
`relname` CHAR(20) NOT NULL DEFAULT '',
`tel` CHAR(11) NOT NULL DEFAULT '',
`user_uid` INT UNSIGNED NOT NULL,
PRIMARY KEY (`uiid`),
INDEX `fk_userinfor_user1_idx` (`user_uid` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci
COMMENT = '用户信息表';
-- -----------------------------------------------------
-- Table `legou`.`legou_role`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_role` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_role` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(20) NOT NULL DEFAULT '',
`pid` INT UNSIGNED NOT NULL,
`status` TINYINT(1) UNSIGNED NOT NULL,
`remark` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;
-- -----------------------------------------------------
-- Table `legou`.`legou_user_role`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_user_role` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_user_role` (
`role_id` INT UNSIGNED NOT NULL,
`user_id` INT UNSIGNED NOT NULL,
INDEX `fk_user_role_admin1_idx` (`user_id` ASC),
INDEX `fk_user_role_role1_idx` (`role_id` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;
-- -----------------------------------------------------
-- Table `legou`.`legou_node`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_node` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_node` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(20) NOT NULL DEFAULT '',
`title` VARCHAR(45) NULL DEFAULT '',
`pid` INT UNSIGNED NOT NULL DEFAULT 0,
`level` TINYINT(1) UNSIGNED NOT NULL,
`status` TINYINT(1) NULL,
`remark` VARCHAR(255) NULL,
`sort` SMALLINT(6) UNSIGNED NOT NULL,
`show` TINYINT(1) UNSIGNED NOT NULL,
PRIMARY KEY (`id`))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;
-- -----------------------------------------------------
-- Table `legou`.`legou_access`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `legou`.`legou_access` ;
CREATE TABLE IF NOT EXISTS `legou`.`legou_access` (
`role_id` INT UNSIGNED NOT NULL,
`node_id` INT UNSIGNED NOT NULL,
INDEX `fk_access_role1_idx` (`role_id` ASC),
INDEX `fk_access_node1_idx` (`node_id` ASC))
ENGINE = MyISAM
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;
insert into legou_admin set username='admin',password=md5('admin');
insert into legou_admin set username='colorado',password=md5('colorado');
insert into legou_admin set username='aq1990424',password=md5('aq1990424');
#插入权限结点
insert into legou_node (name,title,pid,level,status) value
('admin','后台模块',0,1,1),
('category','分类控制器',1,2,1),
('Attr','属性控制器',1,2,1),
('Brand','品牌控制器',1,2,1),
('Glist','货品控制器',1,2,1),
('Goods','商品控制器',1,2,1),
('Type','类型控制器',1,2,1),
('Order','订单控制器',1,2,1),
('Administer','用户管理控制器',1,2,1),
#分类控制器内的方法
('index','分类默认展示方法',2,3,1),
('showSon','分类展示子分类方法',2,3,1),
('add','分类添加方法',2,3,1),
('addSon','分类添加子类方法',2,3,1),
('edit','分类编辑方法',2,3,1),
('del','分类删除方法',2,3,1),
#属性控制器类的方法
('index','属性默认展示方法',3,3,1),
('add','属性添加方法',3,3,1),
('edit','属性编辑方法',3,3,1),
('del','属性删除方法',3,3,1),
#品牌控制器内的方法
('index','品牌默认展示方法',4,3,1),
('add','品牌添加方法',4,3,1),
('edit','品牌编辑方法',4,3,1),
('del','品牌删除方法',4,3,1),
#货品控制器内的方法
('index','货品默认展示方法',5,3,1),
('edit','货品编辑方法',5,3,1),
('del','货品删除方法',5,3,1),
#商品控制器
('index','商品默认展示方法',6,3,1),
('add','商品添加方法',6,3,1),
('edit','商品编辑方法',6,3,1),
('del','商品删除方法',6,3,1),
('attr','商品异步属性',6,3,1),
('listpic','商品上传列表图方法',6,3,1),
('upload','商品上传多商品图方法',6,3,1),
('ajaxdel','商品异步删除图方法',6,3,1),
#类型控制器内的方法
('index','类型默认展示方法',7,3,1),
('add','类型添加方法',7,3,1),
('edit','类型编辑方法',7,3,1),
('del','类型删除方法',7,3,1),
#订单管理
('unpay','未支付订单方法',8,3,1),
('onpay','待发货订单方法',8,3,1),
('unrec','待收货订单方法',8,3,1),
('isrec','已完成订单方法',8,3,1),
('quiet','未完成订单方法',8,3,1),
#用户管理
('index','默认显示方法',9,3,1),
('add','管理员添加方法',9,3,1);
#管理员角色分配
insert into legou_role (name,pid,status,remark) value
('超级管理员',NULL,1,NULL),
('组长',NULL,1,NULL),
('商品添加人员',NULL,1,NULL),
('商品下架人员',NULL,1,NULL),
('订单管理人员',NULL,1,NULL);
#管理角色权限分配
insert into legou_access(role_id,node_id) value
#超级管理员权限
(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9),(1,10),(1,11),(1,12),(1,13),(1,14),(1,15),(1,16),(1,17),(1,18),(1,19),(1,20),(1,21),(1,22),(1,23),(1,24),(1,25),(1,26),(1,27),(1,28),(1,29),(1,30),(1,31),(1,32),(1,33),(1,34),(1,35),(1,36),(1,37),(1,38),(1,39),(1,40),(1,41),(1,42),(1,43),(1,44),(1,45),
#组长权限
(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,7),(2,8),(1,9),(2,10),(2,11),(2,12),(2,13),(2,14),(2,15),(2,16),(2,17),(2,18),(2,19),(2,20),(2,21),(2,22),(2,23),(2,24),(2,25),(2,26),(2,27),(2,28),(2,29),(2,30),(2,31),(2,32),(2,33),(2,34),(2,35),(1,36),(1,37),(1,38),(1,39),(1,40),(1,41),(1,42),(1,43),
#商品添加人员
(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(3,7),(3,8),(1,9),(3,10),(3,11),(3,12),(3,13),(3,14),(3,16),(3,17),(3,18),(3,20),(3,21),(3,22),(3,24),(3,25),(3,27),(3,28),(3,29),(3,31),(3,32),(3,33),(3,34),(3,35),(3,36),(3,37),(3,38),
#商品下架人员
(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(4,7),(4,8),(1,9),(4,10),(4,11),(4,14),(4,15),(4,16),(4,19),(4,20),(4,23),(4,24),(4,26),(4,27),(4,30),(4,31),(4,32),(4,33),(4,34),(4,35),(4,38),
#订单管理人员
(5,1),(1,9),(5,8),(5,39),(5,40),(5,41),(5,42),(5,43);
#添加商品分类数据
insert into legou_category (cname,pid,csort,addtime) value
#顶级分类
('鞋靴',0,1,unix_timestamp()),
('内衣',0,1,unix_timestamp()),
('女装',0,1,unix_timestamp()),
('男装',0,1,unix_timestamp()),
('家居用品',0,1,unix_timestamp()),
('箱包',0,1,unix_timestamp()),
('孕婴童',0,1,unix_timestamp()),
('户外运动',0,1,unix_timestamp()),
('配饰',0,1,unix_timestamp()),
#鞋靴->二级分类
('男鞋',1,2,unix_timestamp()),
('女鞋',1,2,unix_timestamp()),
('鞋护理品',1,2,unix_timestamp()),
('鞋配饰',1,2,unix_timestamp()),
#内衣->二级分类
('女士内衣',2,2,unix_timestamp()),
('男士内衣',2,2,unix_timestamp()),
#女装->二级分类
('上装',3,2,unix_timestamp()),
('外套',3,2,unix_timestamp()),
('裤装',3,2,unix_timestamp()),
('裙装',3,2,unix_timestamp()),
#男装->二级分类
('上装',4,2,unix_timestamp()),
('外套',4,2,unix_timestamp()),
('裤装',4,2,unix_timestamp()),
#家居用品->二级分类
('锅具',5,2,unix_timestamp()),
('床上用品',5,2,unix_timestamp()),
('百货',5,2,unix_timestamp()),
('餐具',5,2,unix_timestamp()),
#箱包->二级分类
('休闲包',6,2,unix_timestamp()),
('功能包',6,2,unix_timestamp()),
('旅行包',6,2,unix_timestamp()),
('手提包',6,2,unix_timestamp()),
#孕婴童->二级分类
('母婴用品',7,2,unix_timestamp()),
('儿童配件',7,2,unix_timestamp()),
('童装',7,2,unix_timestamp()),
('童鞋',7,2,unix_timestamp()),
#户外运动->二级分类
('户外',8,2,unix_timestamp()),
('运动',8,2,unix_timestamp()),
#配饰->二级分类
('流行饰品',9,2,unix_timestamp()),
('手表/眼镜',9,2,unix_timestamp()),
('个人护理',9,2,unix_timestamp()),
('服装配饰',9,2,unix_timestamp()),
#三级菜单
#男鞋->三级菜单
('中靴',10,3,unix_timestamp()),
('雨靴',10,3,unix_timestamp()),
('高靴',10,3,unix_timestamp()),
('低靴',10,3,unix_timestamp()),
('雪地靴',10,3,unix_timestamp()),
('纯凉鞋',10,3,unix_timestamp()),
('人字拖',10,3,unix_timestamp()),
('拖鞋',10,3,unix_timestamp()),
('棉拖',10,3,unix_timestamp()),
('懒人鞋',10,3,unix_timestamp()),
('乐福鞋',10,3,unix_timestamp()),
('豆豆鞋',10,3,unix_timestamp()),
('满帮鞋',10,3,unix_timestamp()),
('商务鞋',10,3,unix_timestamp()),
('正装鞋',10,3,unix_timestamp()),
('运动休闲',10,3,unix_timestamp()),
('休闲鞋',10,3,unix_timestamp()),
('内增高',10,3,unix_timestamp()),
('系带鞋',10,3,unix_timestamp()),
('布洛克鞋',10,3,unix_timestamp()),
('帆船鞋',10,3,unix_timestamp()),
('工装鞋',10,3,unix_timestamp()),
('帆布鞋',10,3,unix_timestamp()),
#女鞋->三级菜单
('雪地靴',11,3,unix_timestamp()),
('中靴',11,3,unix_timestamp()),
('绒里靴',11,3,unix_timestamp()),
('短靴',11,3,unix_timestamp()),
('坡跟靴',11,3,unix_timestamp()),
('超长靴',11,3,unix_timestamp()),
('马丁靴',11,3,unix_timestamp()),
('及踝靴',11,3,unix_timestamp()),
('雨靴',11,3,unix_timestamp()),
('骑士靴',11,3,unix_timestamp()),
('罗马凉鞋',11,3,unix_timestamp()),
('坡跟凉鞋',11,3,unix_timestamp()),
('凉靴',11,3,unix_timestamp()),
('后空凉鞋',11,3,unix_timestamp()),
('鱼嘴凉鞋',11,3,unix_timestamp()),
('纯凉鞋',11,3,unix_timestamp()),
('拖鞋',11,3,unix_timestamp()),
('中空凉鞋',11,3,unix_timestamp()),
('豆豆鞋',11,3,unix_timestamp()),
('松糕鞋',11,3,unix_timestamp()),
('婚鞋',11,3,unix_timestamp()),
('坡跟鞋',11,3,unix_timestamp()),
('防水台',11,3,unix_timestamp()),
('内增高',11,3,unix_timestamp()),
('粗跟鞋',11,3,unix_timestamp()),
('满帮鞋',11,3,unix_timestamp()),
('鱼嘴鞋',11,3,unix_timestamp()),
('浅口鞋',11,3,unix_timestamp()),
('休闲鞋',11,3,unix_timestamp()),
('尖头鞋',11,3,unix_timestamp()),
('平底鞋',11,3,unix_timestamp()),
('乐福鞋',11,3,unix_timestamp()),
('布洛克鞋',11,3,unix_timestamp()),
('运动风',11,3,unix_timestamp()),
#鞋护理品->三级菜单
('鞋护理品',12,3,unix_timestamp()),
#鞋配饰->三级菜单
('袜子',13,3,unix_timestamp()),
('鞋垫',13,3,unix_timestamp()),
('鞋拔',13,3,unix_timestamp()),
#女士内衣->三级菜单
('吊带背心',14,3,unix_timestamp()),
('基础打底',14,3,unix_timestamp()),
('泳装',14,3,unix_timestamp()),
('文胸',14,3,unix_timestamp()),
('内裤',14,3,unix_timestamp()),
('保暖内衣',14,3,unix_timestamp()),
('家居服',14,3,unix_timestamp()),
('塑身美体',14,3,unix_timestamp()),
#男士内衣->三级菜单
('家居服',15,3,unix_timestamp()),
('内裤',15,3,unix_timestamp()),
('泳装',15,3,unix_timestamp()),
('保暖内衣',15,3,unix_timestamp()),
('背心',15,3,unix_timestamp()),
#女上装->三级菜单
('卫衣/绒衫',16,3,unix_timestamp()),
('衬衫',16,3,unix_timestamp()),
('蕾丝衫/雪纺衫',16,3,unix_timestamp()),
('针织衫',16,3,unix_timestamp()),
('马甲',16,3,unix_timestamp()),
('背心',16,3,unix_timestamp()),
('礼服/晚装',16,3,unix_timestamp()),
('T恤',16,3,unix_timestamp()),
('中老年服装',16,3,unix_timestamp()),
('毛衣/羊绒衫',16,3,unix_timestamp()),
#女外套->三级菜单
('毛呢外套',17,3,unix_timestamp()),
('皮衣',17,3,unix_timestamp()),
('短外套',17,3,unix_timestamp()),
('套装',17,3,unix_timestamp()),
('西装',17,3,unix_timestamp()),
('风衣',17,3,unix_timestamp()),
('羽绒服',17,3,unix_timestamp()),
('棉服/棉衣',17,3,unix_timestamp()),
#女裤装->三级菜单
('连衣裤',18,3,unix_timestamp()),
('打底裤',18,3,unix_timestamp()),
('牛仔裤',18,3,unix_timestamp()),
('休闲裤',18,3,unix_timestamp()),
('短裤',18,3,unix_timestamp()),
('棉裤/羽绒裤',18,3,unix_timestamp()),
('西裤',18,3,unix_timestamp()),
#女裙装->三级菜单
('半身裙',19,3,unix_timestamp()),
('连衣裙',19,3,unix_timestamp()),
#男外套->三级菜单
('风衣',20,3,unix_timestamp()),
('棉衣',20,3,unix_timestamp()),
('西服',20,3,unix_timestamp()),
('羽绒服',20,3,unix_timestamp()),
('夹克',20,3,unix_timestamp()),
('皮衣',20,3,unix_timestamp()),
('毛呢大衣',20,3,unix_timestamp()),
#男裤装->三级菜单
('休闲裤',21,3,unix_timestamp()),
('羽绒裤',21,3,unix_timestamp()),
('短裤',21,3,unix_timestamp()),
('棉裤',21,3,unix_timestamp()),
('牛仔裤',21,3,unix_timestamp()),
('西裤',21,3,unix_timestamp()),
#男上装->三级菜单
('针织衫/毛衣',22,3,unix_timestamp()),
('POLO衫',22,3,unix_timestamp()),
('背心/马甲',22,3,unix_timestamp()),
('卫衣',22,3,unix_timestamp()),
('衬衫',22,3,unix_timestamp()),
('T恤',22,3,unix_timestamp()),
#锅具->三级菜单
('炒锅',23,3,unix_timestamp()),
('配件',23,3,unix_timestamp()),
('刀',23,3,unix_timestamp()),
('汤锅',23,3,unix_timestamp()),
('烧烤盘',23,3,unix_timestamp()),
#床上用品->三级菜单
('被套',24,3,unix_timestamp()),
('被子',24,3,unix_timestamp()),
('床笠',24,3,unix_timestamp()),
('床单',24,3,unix_timestamp()),
('枕头',24,3,unix_timestamp()),
('凉席',24,3,unix_timestamp()),
('枕套',24,3,unix_timestamp()),
('休闲毯',24,3,unix_timestamp()),
('蚊帐',24,3,unix_timestamp()),
('床裙',24,3,unix_timestamp()),
('床垫',24,3,unix_timestamp()),
('床品套件',24,3,unix_timestamp()),
#家居百货->三级菜单
('伞',25,3,unix_timestamp()),
('毛巾/浴巾/浴袍',25,3,unix_timestamp()),
('修甲美容工具',25,3,unix_timestamp()),
('坐垫/靠垫',25,3,unix_timestamp()),
('拖鞋',25,3,unix_timestamp()),
('地垫',25,3,unix_timestamp()),
('桌布',25,3,unix_timestamp()),
#餐饮用具->三级菜单
('保鲜盒',26,3,unix_timestamp()),
('保温杯',26,3,unix_timestamp()),
('餐具套装',26,3,unix_timestamp()),
#休闲包->三级菜单
('单肩/斜挎包',27,3,unix_timestamp()),
('双肩背包',27,3,unix_timestamp()),
#功能包->三级菜单
('腰包/挂包',28,3,unix_timestamp()),
('胸包',28,3,unix_timestamp()),
('化妆包',28,3,unix_timestamp()),
('电脑包',28,3,unix_timestamp()),
('钥匙包',28,3,unix_timestamp()),
('梳洗包',28,3,unix_timestamp()),
('公文包',28,3,unix_timestamp()),
('卡包',28,3,unix_timestamp()),
('钱包',28,3,unix_timestamp()),
#旅行包->三级菜单
('旅行箱',29,3,unix_timestamp()),
('旅行袋',29,3,unix_timestamp()),
('手包',30,3,unix_timestamp()),
('手提包',30,3,unix_timestamp()),
#母婴用品->三级菜单
('妈妈护理',31,3,unix_timestamp()),
('产后塑身',31,3,unix_timestamp()),
('妈咪包',31,3,unix_timestamp()),
('连体衣',31,3,unix_timestamp()),
('婴儿内衣',31,3,unix_timestamp()),
('罩衣',31,3,unix_timestamp()),
('婴儿套服',31,3,unix_timestamp()),
('婴儿外出服',31,3,unix_timestamp()),
#儿童配件->三级菜单
('帽子',32,3,unix_timestamp()),
('童玩车/电玩车',32,3,unix_timestamp()),
('滑板车/溜冰鞋',32,3,unix_timestamp()),
('积木/拆装/拼图',32,3,unix_timestamp()),
('球类',32,3,unix_timestamp()),
('跳床',32,3,unix_timestamp()),
('瑜伽垫',32,3,unix_timestamp()),
('水杯/水壶',32,3,unix_timestamp()),
('手套',32,3,unix_timestamp()),
#童装->三级菜单
('冲锋衣',33,3,unix_timestamp()),
('夹克',33,3,unix_timestamp()),
('风衣',33,3,unix_timestamp()),
('大衣',33,3,unix_timestamp()),
('西服',33,3,unix_timestamp()),
('皮肤衣',33,3,unix_timestamp()),
('棉服',33,3,unix_timestamp()),
('羽绒服',33,3,unix_timestamp()),
#童鞋->三级菜单
('帆布鞋',34,3,unix_timestamp()),
('足球鞋',34,3,unix_timestamp()),
('跑步鞋',34,3,unix_timestamp()),
('板鞋',34,3,unix_timestamp()),
('篮球鞋',34,3,unix_timestamp()),
('户外鞋',34,3,unix_timestamp()),
('训练鞋',34,3,unix_timestamp()),
('网布镂空鞋',34,3,unix_timestamp()),
('中靴',34,3,unix_timestamp()),
('雪地靴',34,3,unix_timestamp()),
('雨靴',34,3,unix_timestamp()),
#运动->三级菜单
('羽绒服',35,3,unix_timestamp()),
('毛衣',35,3,unix_timestamp()),
('泳装',35,3,unix_timestamp()),
('卫衣/套头衫',35,3,unix_timestamp()),
('背心',35,3,unix_timestamp()),
('POLO衫',35,3,unix_timestamp()),
('套服',35,3,unix_timestamp()),
('棉服',35,3,unix_timestamp()),
('衬衫',35,3,unix_timestamp()),
('紧身服/胸衣',35,3,unix_timestamp()),
('长袖T恤',35,3,unix_timestamp()),
('夹克',35,3,unix_timestamp()),
('马夹',35,3,unix_timestamp()),
('短袖T恤',35,3,unix_timestamp()),
('针织衫',35,3,unix_timestamp()),
('短裤',35,3,unix_timestamp()),
('中裤',35,3,unix_timestamp()),
('裙子',35,3,unix_timestamp()),
#户外->三级菜单
('卫衣',36,3,unix_timestamp()),
('速干衣',36,3,unix_timestamp()),
('骑行服',36,3,unix_timestamp()),
('运动文胸',36,3,unix_timestamp()),
('POLO衫',36,3,unix_timestamp()),
('抓绒衣',36,3,unix_timestamp()),
('冲锋衣',36,3,unix_timestamp()),
('马甲',36,3,unix_timestamp()),
('羽绒服',36,3,unix_timestamp()),
('保暖',36,3,unix_timestamp()),
('软壳',36,3,unix_timestamp()),
#流行饰品->三级菜单
('项链',37,3,unix_timestamp()),
('项坠/吊坠',37,3,unix_timestamp()),
('手链/手镯',37,3,unix_timestamp()),
('戒指/指环',37,3,unix_timestamp()),
('脚链',37,3,unix_timestamp()),
('发饰',37,3,unix_timestamp()),
('首饰套装',37,3,unix_timestamp()),
('胸针/胸花',37,3,unix_timestamp()),
('耳饰',37,3,unix_timestamp()),
#手表/眼镜->三级菜单
('手表',38,3,unix_timestamp()),
('眼镜',38,3,unix_timestamp()),
#个人护理->三级菜单
('项环',39,3,unix_timestamp()),
('保健袜',39,3,unix_timestamp()),
('钛贴',39,3,unix_timestamp()),
('护具',39,3,unix_timestamp()),
#服装配饰->三级菜单
('手套',40,3,unix_timestamp()),
('耳饰',40,3,unix_timestamp()),
('发饰',40,3,unix_timestamp()),
('胸针/胸花',40,3,unix_timestamp()),
('脚链',40,3,unix_timestamp()),
('假领',40,3,unix_timestamp()),
('身体彩绘',40,3,unix_timestamp()),
('耳套',40,3,unix_timestamp()),
('护腰/护膝',40,3,unix_timestamp()),
('腰带',40,3,unix_timestamp()),
('围巾',40,3,unix_timestamp()),
('皮具护理',40,3,unix_timestamp()),
('帽子',40,3,unix_timestamp()),
('领带',40,3,unix_timestamp());
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化