前后端分离式开发02
Posted cgblpx皮皮霞
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了前后端分离式开发02相关的知识,希望对你有一定的参考价值。
文章目录
4 前后端练习 - 商品分类
4.1 需求
完成商品分类查询
4.2 数据库设计
CREATE TABLE `item_cat` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`parent_id` INT(11) DEFAULT NULL,
`name` VARCHAR(150) DEFAULT NULL,
`status` INT(11) DEFAULT NULL,
`level` INT(11) DEFAULT NULL,
`created` DATETIME DEFAULT NULL,
`updated` DATETIME DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=INNODB AUTO_INCREMENT=1183 DEFAULT CHARSET=utf8;
INSERT INTO `item_cat`(`id`,`parent_id`,`name`,`status`,`level`,`created`,`updated`) VALUES (1,0,'图书、音像、电子书刊',1,1,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(2,1,'电子书刊',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(3,2,'电子书',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(4,2,'网络原创',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(5,2,'数字杂志',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(6,2,'多媒体图书',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(7,1,'音像',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(8,7,'音乐',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(9,7,'影视',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(10,7,'教育音像',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(11,1,'英文原版',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(12,11,'少儿',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(13,11,'商务投资',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(14,11,'英语学习与考试',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(15,11,'小说',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(16,11,'传记',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(17,11,'励志',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(18,1,'文艺',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(19,18,'小说',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(20,18,'文学',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(21,18,'青春文学',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(22,18,'传记',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(23,18,'艺术',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(24,1,'少儿',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(25,24,'少儿',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(26,24,'0-2岁',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(27,24,'3-6岁',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(28,24,'7-10岁',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(29,24,'11-14岁',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(30,1,'人文社科',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(31,30,'历史',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(32,30,'哲学',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(33,30,'国学',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(34,30,'政治/军事',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(35,30,'法律',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(36,30,'宗教',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(37,30,'心理学',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(38,30,'文化',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(39,30,'社会科学',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(40,1,'经管励志',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(41,40,'经济',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(42,40,'金融与投资',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(43,40,'管理',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(44,40,'励志与成功',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(45,1,'生活',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(46,45,'生活',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(47,45,'健身与保健',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(48,45,'家庭与育儿',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(49,45,'旅游',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(50,45,'动漫/幽默',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(51,1,'科技',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(52,51,'科技',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(53,51,'工程',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(54,51,'建筑',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(55,51,'医学',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(56,51,'科学与自然',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(57,51,'计算机与互联网',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(58,51,'体育/运动',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(59,1,'教育',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(60,59,'教材教辅',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(61,59,'教育与考试',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(62,59,'外语学习',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(63,59,'新闻出版',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(64,59,'语言文字',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(65,1,'港台图书',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(66,65,'艺术/设计/收藏',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(67,65,'经济管理',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(68,65,'文化/学术',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(69,65,'少儿文学/国学',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(70,1,'其它',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(71,70,'工具书',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(72,70,'影印版',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(73,70,'套装书',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(74,0,'家用电器',1,1,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(75,74,'大 家 电',1,2,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(76,75,'平板电视',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(77,75,'空调',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(78,75,'冰箱',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(79,75,'洗衣机',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(80,75,'家庭影院',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(81,75,'DVD播放机',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(82,75,'迷你音响',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(83,75,'烟机/灶具',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(84,75,'热水器',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(85,75,'消毒柜/洗碗机',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(86,75,'酒柜/冰吧/冷柜',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02'),(87,75,'家电配件',1,3,'2021-03-29 18:09:38','2021-03-29 18:10:02以上是关于前后端分离式开发02的主要内容,如果未能解决你的问题,请参考以下文章