diff --git a/youxi.sql b/youxi.sql new file mode 100644 index 0000000..bc52c49 --- /dev/null +++ b/youxi.sql @@ -0,0 +1,349 @@ +# Host: 127.0.0.1 (Version 5.6.51-log) +# Date: 2023-04-10 19:34:56 +# Generator: MySQL-Front 5.4 (Build 4.153) - http://www.mysqlfront.de/ + +/*!40101 SET NAMES utf8 */; + +# +# Structure for table "account" +# + +DROP TABLE IF EXISTS `account`; +CREATE TABLE `account` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(32) NOT NULL, + `password` varchar(32) NOT NULL, + `email` varchar(32) DEFAULT NULL, + `trueName` varchar(32) DEFAULT NULL, + `sex` int(2) DEFAULT '0', + `status` int(2) DEFAULT '1', + `createTime` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; + +# +# Data for table "account" +# + +INSERT INTO `account` VALUES (9,'a','a','1300273076@qq.com',NULL,0,1,'2023-03-18 19:38:26'),(10,'g','g','111@qq.com',NULL,0,1,'2023-03-21 17:01:41'),(11,'z','z','z@qq.com',NULL,0,1,'2023-04-08 09:25:46'); + +# +# Structure for table "address" +# + +DROP TABLE IF EXISTS `address`; +CREATE TABLE `address` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `userId` int(11) NOT NULL, + `name` varchar(128) NOT NULL, + `address` varchar(128) NOT NULL, + `phone` varchar(32) NOT NULL DEFAULT '', + `createTime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `userId` (`userId`), + CONSTRAINT `address_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `account` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8; + +# +# Data for table "address" +# + +INSERT INTO `address` VALUES (15,9,'a','河南省郑州市','1111111','2023-03-18 19:39:48'),(16,10,'g','河南省郑州市','1','2023-03-21 17:08:19'),(17,11,'z','z','1','2023-04-08 09:26:37'); + +# +# Structure for table "c3p0testtable" +# + +DROP TABLE IF EXISTS `c3p0testtable`; +CREATE TABLE `c3p0testtable` ( + `a` char(1) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +# +# Data for table "c3p0testtable" +# + + +# +# Structure for table "log" +# + +DROP TABLE IF EXISTS `log`; +CREATE TABLE `log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `content` varchar(255) NOT NULL, + `createTime` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=utf8; + +# +# Data for table "log" +# + +INSERT INTO `log` VALUES (117,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-03-21 16:56:54'),(118,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-03-21 16:58:51'),(119,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-03-21 19:12:56'),(120,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-03-21 19:52:08'),(121,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-03-21 20:32:59'),(122,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-03-21 21:02:15'),(123,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-03-21 21:04:32'),(124,'添加admin失败!','2023-03-21 21:15:43'),(125,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-03-21 21:15:52'),(126,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-03-21 21:23:22'),(127,'添加admin失败!','2023-03-21 21:25:50'),(128,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-03-21 21:25:59'),(129,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-04-06 21:00:32'),(130,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-04-06 21:14:07'),(131,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-04-08 08:28:07'),(132,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-04-08 09:01:50'),(133,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-04-08 09:12:16'),(134,'添加admin失败!','2023-04-08 09:15:13'),(135,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-04-08 09:15:22'),(136,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-04-08 09:20:40'),(137,'用户名为{admin}角色为{超级管理员}的用户登录成功!','2023-04-10 11:54:33'); + +# +# Structure for table "menu" +# + +DROP TABLE IF EXISTS `menu`; +CREATE TABLE `menu` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `parentId` int(11) NOT NULL DEFAULT '-1', + `name` varchar(32) NOT NULL, + `url` varchar(128) DEFAULT NULL, + `icon` varchar(32) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=utf8; + +# +# Data for table "menu" +# + +INSERT INTO `menu` VALUES (1,0,'系统设置','','icon-advancedsettings'),(5,1,'菜单管理','../admin/menu/list','icon-chart-organisation'),(13,1,'角色管理','../admin/role/list','icon-group-key'),(14,0,'用户管理','','icon-group-gear'),(15,14,'用户列表','../admin/user/list','icon-group'),(17,5,'添加','openAdd()','icon-add'),(18,5,'编辑','openEdit()','icon-bullet-edit'),(19,5,'删除','remove()','icon-cross'),(20,5,'添加按钮','openAddMenu()','icon-add'),(21,13,'添加','openAdd()','icon-add'),(22,13,'编辑','openEdit()','icon-bullet-edit'),(23,13,'删除','remove()','icon-cross'),(24,15,'添加','openAdd()','icon-add'),(25,15,'编辑','openEdit()','icon-bullet-edit'),(26,15,'删除','remove()','icon-cross'),(31,0,'系统日志','','icon-table-cell'),(32,31,'日志列表','../admin/log/list','icon-page-white-text'),(33,32,'添加日志','openAdd()','icon-add1'),(34,32,'删除','remove()','icon-cancel'),(35,1,'修改密码','edit_password','icon-lock-edit'),(36,35,'修改密码','openAdd()','icon-lock-edit'),(37,0,'商品分类','','icon-sitemap-color'),(38,37,'分类列表','../admin/product_category/list','icon-sitemap'),(39,38,'添加','openAdd()','icon-chart-organisation-add'),(40,38,'编辑','openEdit()','icon-bullet-edit'),(41,38,'删除','remove()','icon-chart-organisation-delete'),(42,0,'商品管理','','icon-cart-full'),(43,42,'商品列表','../admin/product/list','icon-cart'),(44,43,'添加','openAdd()','icon-cart-add'),(45,43,'编辑','openEdit()','icon-cart-edit'),(46,43,'删除','remove()','icon-cart-delete'),(47,0,'客户管理','','icon-users'),(48,47,'客户列表','../admin/account/list','icon-user-group'),(49,48,'添加','openAdd()','icon-user-add'),(50,48,'编辑','openEdit()','icon-user-edit'),(51,48,'删除','remove()','icon-user-cross'),(52,0,'订单管理','','icon-database'),(53,52,'订单列表','../admin/order/list','icon-database-gear'),(54,53,'编辑订单','openEdit()','icon-database-edit'),(55,53,'查看订单','openView()','icon-eye'),(56,0,'评论管理','','icon-comment'),(57,56,'评论列表','../admin/comment/list','icon-comments'),(58,57,'编辑','openEdit()','icon-comment-edit'),(59,57,'删除','remove()','icon-comment-delete'),(60,0,'销售统计','','icon-chart-curve'),(61,60,'统计图表','../admin/stats/stats','icon-chart-line'); + +# +# Structure for table "orders" +# + +DROP TABLE IF EXISTS `orders`; +CREATE TABLE `orders` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `sn` varchar(32) NOT NULL, + `userId` int(11) NOT NULL, + `address` varchar(128) NOT NULL, + `money` double(8,2) NOT NULL DEFAULT '0.00', + `productNum` int(5) NOT NULL DEFAULT '0', + `status` int(2) NOT NULL DEFAULT '0', + `remark` varchar(128) DEFAULT NULL, + `createTime` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `userId` (`userId`), + CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `account` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; + +# +# Data for table "orders" +# + +INSERT INTO `orders` VALUES (3,'O1679139594304',9,'河南省郑州市 a(收) 1111111',69.90,1,2,'','2023-03-18 19:39:54'),(4,'O1679389705952',10,'河南省郑州市 g(收) 1',139.80,2,2,'','2023-03-21 17:08:26'),(5,'O1680916067350',9,'河南省郑州市 a(收) 1111111',179.70,3,0,'','2023-04-08 09:07:47'),(6,'O1680916303241',10,'河南省郑州市 g(收) 1',69.90,1,0,'','2023-04-08 09:11:43'),(7,'O1680917219939',11,'z z(收) 1',69.90,1,0,'','2023-04-08 09:27:00'); + +# +# Structure for table "product_category" +# + +DROP TABLE IF EXISTS `product_category`; +CREATE TABLE `product_category` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `parentId` int(11) DEFAULT NULL, + `name` varchar(128) CHARACTER SET utf32 NOT NULL, + `tags` varchar(32) DEFAULT NULL, + `remark` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=336 DEFAULT CHARSET=utf8; + +# +# Data for table "product_category" +# + +INSERT INTO `product_category` VALUES (333,NULL,'原神',NULL,'游戏发生在一个被称作“提瓦特”的幻想世界,在这里,被神选中的人将被授予“神之眼”,导引元素之力。玩家将扮演一位名为“旅行者”的神秘角色,在自由的旅行中邂逅性格各异、能力独特的同伴们,和他们一起击败强敌,找回失散的亲人——同时,逐步发掘“原神”的真相'),(334,NULL,'王者荣耀',NULL,'王者荣耀中的玩法以竞技对战为主,玩家之间进行1V1、3V3、5V5等多种方式的PVP对战,在满足条件后可以参加游戏的排位赛等,还可以参加PVE的闯关模式,是属于推塔类型的游戏'),(335,NULL,'未定事件簿',NULL,'米哈游 研发的一款律政恋爱推理手游,玩家将扮演一位刚入职场的初级律师,在与四位男主角携手解决离奇委托的过程中,被卷入不为人知的阴谋,开始一场恋爱×推理的冒险'); + +# +# Structure for table "product" +# + +DROP TABLE IF EXISTS `product`; +CREATE TABLE `product` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `productCategoryId` int(11) NOT NULL, + `name` varchar(128) NOT NULL, + `tags` varchar(32) NOT NULL, + `imageUrl` varchar(128) NOT NULL, + `price` float(8,2) NOT NULL, + `stock` int(8) NOT NULL DEFAULT '0', + `sellNum` int(8) NOT NULL DEFAULT '0', + `viewNum` int(8) NOT NULL DEFAULT '0', + `commentNum` int(8) NOT NULL DEFAULT '0', + `content` text, + `createTime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `productCategoryId` (`productCategoryId`), + CONSTRAINT `product_ibfk_1` FOREIGN KEY (`productCategoryId`) REFERENCES `product_category` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8; + +# +# Data for table "product" +# + +INSERT INTO `product` VALUES (42,333,'钥匙扣','null,333','/youxi/resources/upload/1679399551736.jpg',39.90,50,1,9,0,'

原神周边

','2023-03-18 17:35:22'),(43,335,'钥匙扣','null,335','/youxi/resources/upload/1679399565255.jpg',39.90,48,3,19,0,'

周边

','2023-03-18 17:37:41'),(44,334,'手办','null,334','/youxi/resources/upload/1679399578556.jpg',99.90,14,3,11,1,'','2023-03-18 17:39:49'),(57,333,'抱枕','null,333','/youxi/resources/upload/1679399590626.jpg',69.90,25,5,22,2,'','2023-03-18 19:16:54'); + +# +# Structure for table "cart" +# + +DROP TABLE IF EXISTS `cart`; +CREATE TABLE `cart` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `userId` int(11) NOT NULL, + `productId` int(11) NOT NULL, + `name` varchar(128) NOT NULL, + `imageUrl` varchar(128) NOT NULL, + `price` float(8,2) NOT NULL DEFAULT '0.00', + `num` int(8) NOT NULL DEFAULT '0', + `money` double(8,2) NOT NULL DEFAULT '0.00', + `createTime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `productCategoryId` (`productId`), + KEY `userId` (`userId`), + CONSTRAINT `cart_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `account` (`id`), + CONSTRAINT `cart_ibfk_2` FOREIGN KEY (`productId`) REFERENCES `product` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; + +# +# Data for table "cart" +# + +INSERT INTO `cart` VALUES (5,9,57,'抱枕','/youxi/resources/upload/1679399590626.jpg',69.90,1,69.90,'2023-04-10 11:53:37'); + +# +# Structure for table "comment" +# + +DROP TABLE IF EXISTS `comment`; +CREATE TABLE `comment` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `productId` int(11) NOT NULL, + `userId` int(11) NOT NULL, + `type` int(2) NOT NULL DEFAULT '1', + `content` varchar(512) NOT NULL, + `createTime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `productId` (`productId`), + KEY `userId` (`userId`), + CONSTRAINT `comment_ibfk_1` FOREIGN KEY (`productId`) REFERENCES `product` (`id`), + CONSTRAINT `comment_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `account` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; + +# +# Data for table "comment" +# + +INSERT INTO `comment` VALUES (2,57,9,1,'不错','2023-03-18 19:41:54'),(3,57,10,1,'很好啊','2023-03-21 17:09:35'); + +# +# Structure for table "favorite" +# + +DROP TABLE IF EXISTS `favorite`; +CREATE TABLE `favorite` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `userId` int(11) NOT NULL, + `productId` int(11) NOT NULL, + `name` varchar(128) NOT NULL, + `imageUrl` varchar(128) NOT NULL, + `price` float(8,2) NOT NULL DEFAULT '0.00', + `createTime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `productCategoryId` (`productId`), + KEY `userId` (`userId`), + CONSTRAINT `favorite_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `account` (`id`), + CONSTRAINT `favorite_ibfk_2` FOREIGN KEY (`productId`) REFERENCES `product` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; + +# +# Data for table "favorite" +# + +INSERT INTO `favorite` VALUES (2,9,43,'钥匙扣','/youxi/resources/upload/1679399565255.jpg',39.90,'2023-03-22 10:44:23'),(3,9,42,'钥匙扣','/youxi/resources/upload/1679399551736.jpg',39.90,'2023-03-22 10:44:45'),(4,9,57,'抱枕','/youxi/resources/upload/1679399590626.jpg',69.90,'2023-04-08 09:19:56'),(5,11,57,'抱枕','/youxi/resources/upload/1679399590626.jpg',69.90,'2023-04-08 09:26:48'); + +# +# Structure for table "order_item" +# + +DROP TABLE IF EXISTS `order_item`; +CREATE TABLE `order_item` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `productId` int(11) NOT NULL, + `orderId` int(11) NOT NULL, + `name` varchar(128) NOT NULL, + `imageUrl` varchar(128) NOT NULL, + `price` float(8,2) NOT NULL, + `num` int(8) NOT NULL DEFAULT '0', + `money` double(8,2) NOT NULL DEFAULT '0.00', + PRIMARY KEY (`id`), + KEY `productCategoryId` (`orderId`), + KEY `productId` (`productId`), + CONSTRAINT `order_item_ibfk_1` FOREIGN KEY (`productId`) REFERENCES `product` (`id`), + CONSTRAINT `order_item_ibfk_2` FOREIGN KEY (`orderId`) REFERENCES `orders` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; + +# +# Data for table "order_item" +# + +INSERT INTO `order_item` VALUES (4,57,3,'抱枕','/youxi/resources/upload/1679138197401.jpg',69.90,1,69.90),(5,57,4,'抱枕','/youxi/resources/upload/1679138197401.jpg',69.90,2,139.80),(6,44,5,'手办','/youxi/resources/upload/1679399578556.jpg',99.90,1,99.90),(7,43,5,'钥匙扣','/youxi/resources/upload/1679399565255.jpg',39.90,2,79.80),(8,57,6,'抱枕','/youxi/resources/upload/1679399590626.jpg',69.90,1,69.90),(9,57,7,'抱枕','/youxi/resources/upload/1679399590626.jpg',69.90,1,69.90); + +# +# Structure for table "role" +# + +DROP TABLE IF EXISTS `role`; +CREATE TABLE `role` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(32) NOT NULL, + `remark` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; + +# +# Data for table "role" +# + +INSERT INTO `role` VALUES (1,'超级管理员','超级管理员拥有一切权限!'),(2,'普通用户','普通用户,请自由授权!'); + +# +# Structure for table "authority" +# + +DROP TABLE IF EXISTS `authority`; +CREATE TABLE `authority` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `roleId` int(11) NOT NULL, + `menuId` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `roleId` (`roleId`), + KEY `menuId` (`menuId`), + CONSTRAINT `authority_ibfk_1` FOREIGN KEY (`roleId`) REFERENCES `role` (`id`), + CONSTRAINT `authority_ibfk_2` FOREIGN KEY (`menuId`) REFERENCES `menu` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=377 DEFAULT CHARSET=utf8; + +# +# Data for table "authority" +# + +INSERT INTO `authority` VALUES (148,2,35),(149,2,36),(150,2,25),(151,2,1),(152,2,14),(153,2,15),(331,1,1),(332,1,5),(333,1,17),(334,1,18),(335,1,19),(336,1,20),(337,1,13),(338,1,21),(339,1,22),(340,1,23),(341,1,35),(342,1,36),(343,1,14),(344,1,15),(345,1,24),(346,1,25),(347,1,26),(348,1,31),(349,1,32),(350,1,33),(351,1,34),(352,1,37),(353,1,38),(354,1,39),(355,1,40),(356,1,41),(357,1,42),(358,1,43),(359,1,44),(360,1,45),(361,1,46),(362,1,47),(363,1,48),(364,1,49),(365,1,50),(366,1,51),(367,1,52),(368,1,53),(369,1,54),(370,1,55),(371,1,56),(372,1,57),(373,1,58),(374,1,59),(375,1,60),(376,1,61); + +# +# Structure for table "user" +# + +DROP TABLE IF EXISTS `user`; +CREATE TABLE `user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(32) NOT NULL, + `password` varchar(32) NOT NULL, + `roleId` int(11) NOT NULL, + `photo` varchar(128) DEFAULT NULL, + `sex` int(1) NOT NULL DEFAULT '0', + `age` int(3) NOT NULL DEFAULT '0', + `address` varchar(128) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `roleId` (`roleId`), + CONSTRAINT `user_ibfk_1` FOREIGN KEY (`roleId`) REFERENCES `role` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; + +# +# Data for table "user" +# + +INSERT INTO `user` VALUES (1,'admin','admin',1,'/youxi/resources/upload/1679404298911.jpg',2,1,'河南省郑州市');