代码拉取完成,页面将自动刷新
/*
Navicat Premium Data Transfer
Source Server : 阿里云2
Source Server Type : MySQL
Source Server Version : 80200
Source Host : 8.134.216.99:3306
Source Schema : CampusMarkets
Target Server Type : MySQL
Target Server Version : 80200
File Encoding : 65001
Date: 09/12/2023 18:43:39
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for Product
-- ----------------------------
DROP TABLE IF EXISTS `Product`;
CREATE TABLE `Product` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`type` int NULL DEFAULT NULL,
`status` int NULL DEFAULT NULL COMMENT '0是未审核,1是审核通过,2是审核未通过',
`create_time` datetime NULL DEFAULT NULL,
`update_time` datetime NULL DEFAULT NULL,
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`price` decimal(10, 2) NULL DEFAULT NULL,
`userid` int NULL DEFAULT NULL,
`image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图片',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of Product
-- ----------------------------
INSERT INTO `Product` VALUES (2, '测试', '测试描述', 1, 0, '2023-11-23 19:59:04', '2023-11-23 19:59:04', '测试标题', 12.79, 28, 'http://s5e6gf41q.hd-bkt.clouddn.com/2023/12/09/c982a5466f58420fa7fb5f770b3631cd.jpg');
INSERT INTO `Product` VALUES (4, '换个用户测试', '测试描述111', 2, 1, '2023-11-23 20:38:25', '2023-11-23 20:38:25', '测试标题111', 22.22, 1, 'http://s5e6gf41q.hd-bkt.clouddn.com/2023/12/09/c982a5466f58420fa7fb5f770b3631cd.jpg');
-- ----------------------------
-- Table structure for sales_order
-- ----------------------------
DROP TABLE IF EXISTS `sales_order`;
CREATE TABLE `sales_order` (
`id` bigint NOT NULL AUTO_INCREMENT,
`productId` int NOT NULL,
`userId` int NOT NULL,
`num` int NULL DEFAULT NULL,
`totalPrice` decimal(10, 2) NULL DEFAULT NULL,
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`status` int NULL DEFAULT NULL COMMENT '0是待支付,1是已支付,2是取消或15分钟过期',
`create_time` datetime NULL DEFAULT NULL,
`update_time` datetime NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sales_order
-- ----------------------------
INSERT INTO `sales_order` VALUES (2, 2, 1, 2, 25.58, '11111', 2, '2023-11-27 00:24:16', '2023-11-27 00:24:16');
INSERT INTO `sales_order` VALUES (5, 2, 1, 2, 25.58, '测试到期', 1, '2023-11-27 00:59:47', '2023-11-27 01:01:34');
INSERT INTO `sales_order` VALUES (9, 2, 1, 2, 25.58, '222222', 2, '2023-11-27 01:50:10', '2023-11-27 01:51:11');
INSERT INTO `sales_order` VALUES (10, 2, 1, 2, 25.58, '15分钟到期', 2, '2023-11-27 01:56:04', '2023-11-27 02:11:06');
-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
`menu_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '菜单名称',
`component` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '组件路径',
`status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT '0' COMMENT '菜单状态(0正常 1停用)',
`perms` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '权限标识',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT '' COMMENT '备注',
`del_flag` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT '0',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2034 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '菜单权限表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES (1, '查询全部商品', 'admin/getAllProducts', '0', 'admin:getAllProducts', '2023-11-27 07:57:00', '2023-11-27 07:57:02', '管理员查询所有商品', '0');
INSERT INTO `sys_menu` VALUES (2, '审核通过', 'admin/pass', '0', 'admin:pass', '2023-11-27 07:54:00', '2023-11-27 07:54:34', '管理员审核通过商品', '0');
INSERT INTO `sys_menu` VALUES (3, '审核失败', 'admin/fail', '0', 'admin:fail', '2023-11-27 08:41:38', '2023-11-27 08:41:40', '管理员审核未通过', '0');
INSERT INTO `sys_menu` VALUES (4, '下架商品', 'admin/off', '0', 'admin:off', '2023-11-27 08:42:12', '2023-11-27 08:42:14', '管理员下架商品', '0');
INSERT INTO `sys_menu` VALUES (5, '用户退出', 'logout', '0', 'logout', '2023-11-27 08:44:08', '2023-11-27 08:44:10', '用户退出登录', '0');
INSERT INTO `sys_menu` VALUES (6, '创建订单', 'order/create', '0', 'order:create', '2023-11-27 08:45:57', '2023-11-27 08:45:59', '用户创建商品订单', '0');
INSERT INTO `sys_menu` VALUES (7, '支付订单', 'order/pay', '0', 'order:pay', '2023-11-27 08:46:31', '2023-11-27 08:46:28', '用户支付商品订单', '0');
INSERT INTO `sys_menu` VALUES (8, '添加商品', 'product/add', '0', 'product:add', '2023-11-27 08:58:17', '2023-11-27 08:58:22', '用户添加商品(未审核)', '0');
INSERT INTO `sys_menu` VALUES (9, '获取审核中商品', 'product/getUnauditedProduct', '0', 'product:getUnauditedProduct', '2023-11-27 08:58:19', '2023-11-27 08:58:24', '用户获取审核中商品', '0');
INSERT INTO `sys_menu` VALUES (10, '获取审核失败商品', 'product/getFailedProduct', '0', 'product:getFailedProduct', '2023-11-27 08:58:26', '2023-11-27 08:58:28', '用户获取审核失败商品', '0');
INSERT INTO `sys_menu` VALUES (11, '获取审核成功商品', 'product/getPassProduct', '0', 'product:getPassProduct', '2023-11-27 08:58:31', '2023-11-27 08:58:33', '用户获取审核成功商品', '0');
INSERT INTO `sys_menu` VALUES (12, '删除商品', 'product/deleteProduct', '0', 'product:deleteProduct', '2023-11-27 08:58:35', '2023-11-27 08:58:38', '用户删除自己发布的商品', '0');
INSERT INTO `sys_menu` VALUES (13, '更新商品', 'product/update', '0', 'product:update', '2023-11-27 08:58:40', '2023-11-27 08:58:43', '用户根据商品id更新已发布商品信息,更新后进入未审核状态', '0');
INSERT INTO `sys_menu` VALUES (14, '浏览商品', 'product/getAllProduct', '0', 'product:getAllProduct', '2023-11-27 08:58:45', '2023-11-27 08:58:47', '用户浏览全部审核已通过的商品', '0');
INSERT INTO `sys_menu` VALUES (15, '商品详情', 'product/getProductInfo', '0', 'product:getProductInfo', '2023-11-27 08:58:50', '2023-11-27 08:58:52', '用户查看商品详情', '0');
INSERT INTO `sys_menu` VALUES (16, '搜索用户', 'search/user', '0', 'search:user', '2023-11-27 08:58:54', '2023-11-27 08:58:56', '用户模糊搜索 ', '0');
INSERT INTO `sys_menu` VALUES (17, '搜索商品', 'search/product', '0', 'search:product', '2023-11-27 08:58:58', '2023-11-27 08:59:00', '商品模糊搜索', '0');
INSERT INTO `sys_menu` VALUES (18, '个人信息', 'user/userInfo', '0', 'user:userInfo', '2023-11-27 08:59:03', '2023-11-27 08:59:05', '用户查看或更改个人信息', '0');
INSERT INTO `sys_menu` VALUES (19, '查看他人信息', 'user/otherUserInfo', '0', 'user:otherUserInfo', '2023-11-27 08:59:08', '2023-11-27 08:59:10', '根据id获取别人信息', '0');
INSERT INTO `sys_menu` VALUES (20, '上传文件', 'upload', '0', 'upload', '2023-12-09 17:16:54', '2023-12-09 17:16:56', '上传图片', '0');
-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '角色ID',
`role_name` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '角色名称',
`role_key` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '角色权限字符串',
`role_sort` int NOT NULL COMMENT '显示顺序',
`status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '角色状态(0正常 1停用)',
`del_flag` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)',
`create_by` bigint NULL DEFAULT NULL COMMENT '创建者',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_by` bigint NULL DEFAULT NULL COMMENT '更新者',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '角色信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'admin', 1, '0', '0', 0, '2022-11-12 10:46:19', 0, NULL, '超级管理员');
INSERT INTO `sys_role` VALUES (2, '普通角色', 'common', 2, '0', '0', 0, '2022-11-12 10:46:19', 0, NULL, '普通角色');
-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
`role_id` bigint NOT NULL COMMENT '角色ID',
`menu_id` bigint NOT NULL COMMENT '菜单ID',
PRIMARY KEY (`role_id`, `menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO `sys_role_menu` VALUES (1, 1);
INSERT INTO `sys_role_menu` VALUES (1, 2);
INSERT INTO `sys_role_menu` VALUES (1, 3);
INSERT INTO `sys_role_menu` VALUES (1, 4);
INSERT INTO `sys_role_menu` VALUES (2, 5);
INSERT INTO `sys_role_menu` VALUES (2, 6);
INSERT INTO `sys_role_menu` VALUES (2, 7);
INSERT INTO `sys_role_menu` VALUES (2, 8);
INSERT INTO `sys_role_menu` VALUES (2, 9);
INSERT INTO `sys_role_menu` VALUES (2, 10);
INSERT INTO `sys_role_menu` VALUES (2, 11);
INSERT INTO `sys_role_menu` VALUES (2, 12);
INSERT INTO `sys_role_menu` VALUES (2, 13);
INSERT INTO `sys_role_menu` VALUES (2, 14);
INSERT INTO `sys_role_menu` VALUES (2, 15);
INSERT INTO `sys_role_menu` VALUES (2, 16);
INSERT INTO `sys_role_menu` VALUES (2, 17);
INSERT INTO `sys_role_menu` VALUES (2, 18);
INSERT INTO `sys_role_menu` VALUES (2, 19);
INSERT INTO `sys_role_menu` VALUES (2, 20);
-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'NULL' COMMENT '用户名',
`nick_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'NULL' COMMENT '昵称',
`password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'NULL' COMMENT '密码',
`type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '2' COMMENT '用户类型:2代表普通用户,1代表管理员',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '账号状态(0正常 1停用)',
`email` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '邮箱',
`phonenumber` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '手机号',
`sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户性别(0男,1女,2未知)',
`avatar` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '头像',
`create_by` bigint NULL DEFAULT NULL COMMENT '创建人的用户id',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_by` bigint NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`del_flag` int NULL DEFAULT 0 COMMENT '删除标志(0代表未删除,1代表已删除)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 32 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1, 'admin', 'admin', '$2a$10$Ds3FOl0sDBu2kXxEcRIor.kYALBlxTDzcBajdS0CLbDA0hPY6PbNq', '1', '0', 'admin2@qq.com', NULL, NULL, 'http://s5e6gf41q.hd-bkt.clouddn.com/2023/12/09/c982a5466f58420fa7fb5f770b3631cd.jpg', NULL, '2023-11-22 18:53:36', NULL, '2023-11-22 20:56:03', 0);
INSERT INTO `sys_user` VALUES (27, 'Jianz', 'jianz', '$2a$10$sBqmkER3EZxOOljA9m3feODTR4Xi7tSS1zopXPDXoqT0DqO77jHca', '2', '0', 'romantic0906@qq.com', '18712162686', '0', 'http://s5e6gf41q.hd-bkt.clouddn.com/2023/12/09/c982a5466f58420fa7fb5f770b3631cd.jpg', NULL, '2023-11-22 17:49:48', NULL, '2023-11-22 17:49:48', 0);
INSERT INTO `sys_user` VALUES (29, 'test', 'test', '$2a$10$hcZyw5LaSjvCjxgdrBEVKe0TvuaDIlqezT.SIwvK40aKZwSttKqSi', '2', '0', 'romantic0906@qq.com', '18712162686', '0', 'http://s5e6gf41q.hd-bkt.clouddn.com/2023/12/09/c982a5466f58420fa7fb5f770b3631cd.jpg', NULL, '2023-11-27 06:27:38', NULL, '2023-11-27 06:27:38', 0);
INSERT INTO `sys_user` VALUES (30, 'string11', 'string', '$2a$10$MXQQbxSonXSwWyF4M90UgemjZc7USicR4kc7hwQetLIbBYvLbBPZS', '2', '0', 'string', NULL, NULL, NULL, NULL, '2023-12-06 21:44:15', NULL, '2023-12-06 21:44:15', 0);
INSERT INTO `sys_user` VALUES (31, '123', '123', '$2a$10$xj25j6L4XM2XJIGCTF3vd.hVIhjBvIheQsm3gN4hUgqO05jZseV16', '2', '0', 'romantic0906@qq.com', '18712162686', '0', 'http://s5e6gf41q.hd-bkt.clouddn.com/2023/12/09/c982a5466f58420fa7fb5f770b3631cd.jpg', NULL, '2023-12-07 16:40:38', NULL, '2023-12-07 16:40:38', 0);
-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
`user_id` bigint NOT NULL COMMENT '用户ID',
`role_id` bigint NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`, `role_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '用户和角色关联表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO `sys_user_role` VALUES (1, 1);
INSERT INTO `sys_user_role` VALUES (28, 1);
INSERT INTO `sys_user_role` VALUES (29, 2);
INSERT INTO `sys_user_role` VALUES (30, 2);
INSERT INTO `sys_user_role` VALUES (31, 2);
SET FOREIGN_KEY_CHECKS = 1;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。