【计算机毕业设计】“萌宠小知识”网站

一、前言

如今社会上各行各业,都喜欢用自己行业的专属软件工作,互联网发展到这个时候,人们已经发现离不开了互联网。新技术的产生,往往能解决一些老技术的弊端问题。因为传统萌宠小知识信息管理难度大,容错率低,管理人员处理数据费工费时,所以专门为解决这个难题开发了一个“萌宠小知识”网站,可以解决许多问题。
“萌宠小知识”网站实现的功能包括萌宠专区管理,萌宠专区留言管理,萌宠专区收藏管理,萌宠洗护管理,萌宠洗护留言管理,萌宠洗护收藏管理,萌宠论坛管理,萌宠类型管理,洗护类型管理,公告类型管理,公告信息管理,用户管理等功能。该系统采用了Mysql数据库,Java语言,SSM框架等技术进行编程实现。
“萌宠小知识”网站可以提高萌宠小知识信息管理问题的解决效率,优化萌宠小知识信息处理流程,保证萌宠小知识信息数据的安全,它是一个非常可靠,非常安全的应用程序。

二、说明文档

推荐使用:谷歌浏览器

前台登录页面
http://localhost:8080/mengchongxiaozhishi/front/index.html

后台登录页面
http://localhost:8080/mengchongxiaozhishi/admin/dist/index.html

管理员 账户:admin 密码:admin
用户 账户:a1 密码:123456
用户 账户:a2 密码:123456
用户 账户:a3 密码:123456

在src\main\resources\config.properties中编辑

jdbc_url=jdbc:mysql://127.0.0.1:3306/mengchongxiaozhishi?useUnicode=true&characterEncoding=UTF-8&tinyInt1isBit=false
jdbc_username=root	    数据库用户名 root
jdbc_password=123456	用户密码    123456

图片存放路径: src\main\webapp\upload 里面上传图片名里面不能有中文

三、系统功能设计

“萌宠小知识”网站根据使用权限的角度进行功能分析,并运用用例图来展示各个权限需要操作的功能。
图3.1即为管理员用例图,管理员权限操作的功能包括管理用户,管理萌宠洗护,管理萌宠专区信息,管理萌宠论坛,管理公告信息等。在这里插入图片描述
图3.2即为用户用例图,用户权限操作的功能包括查看萌宠专区信息,查看萌宠洗护教学视频,对萌宠洗护进行留言,对萌宠专区进行留言,在萌宠论坛发帖,评论帖子等。在这里插入图片描述
图3.3即为设计的管理员功能结构,管理员权限操作的功能包括管理用户,管理萌宠洗护,管理萌宠专区信息,管理萌宠论坛,管理公告信息等。在这里插入图片描述
图3.4即为设计的用户功能结构,用户权限操作的功能包括查看萌宠专区信息,查看萌宠洗护教学视频,对萌宠洗护进行留言,对萌宠专区进行留言,在萌宠论坛发帖,评论帖子等。在这里插入图片描述

四、系统数据库设计

“萌宠小知识”网站运行中产生的数据需要按照提前设置的存储规则进行保存,设计出一个符合项目的最优数据存储格式,因为它能减少用户的等待时间,还可以对系统的请求在最短时间内进行响应。所以,对数据库设计时,需要对功能需求进行详细的拆分,以及对业务状态的细分,然后设计具体的存储规则,保证数据库能正常运作,缩短数据处理时间,并在一定程度上降低数据冗余,节省存储空间。在这里插入图片描述
在这里插入图片描述

五、系统效果

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

六、核心代码

/*
SQLyog Ultimate v11.3 (64 bit)
MySQL - 5.7.32-log : Database - mengchongxiaozhishi
*********************************************************************
*/

/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`mengchongxiaozhishi` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `mengchongxiaozhishi`;

/*Table structure for table `chongwu` */

DROP TABLE IF EXISTS `chongwu`;

CREATE TABLE `chongwu` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `chongwu_name` varchar(200) DEFAULT NULL COMMENT '标题 Search111',
  `chongwu_photo` varchar(200) DEFAULT NULL COMMENT '萌宠图片',
  `chongwu_types` int(11) DEFAULT NULL COMMENT '萌宠类型 Search111',
  `chongwu_content` text COMMENT '详情内容',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '发布日期',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show1 show2 photoShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='萌宠专区';

/*Data for the table `chongwu` */

insert  into `chongwu`(`id`,`chongwu_name`,`chongwu_photo`,`chongwu_types`,`chongwu_content`,`insert_time`,`create_time`) values (1,'标题1','http://localhost:8080/mengchongxiaozhishi/upload/chongwu1.jpg',3,'详情内容1','2022-04-06 15:23:12','2022-04-06 15:23:12'),(2,'标题2','http://localhost:8080/mengchongxiaozhishi/upload/chongwu2.jpg',3,'详情内容2','2022-04-06 15:23:12','2022-04-06 15:23:12'),(3,'标题3','http://localhost:8080/mengchongxiaozhishi/upload/chongwu3.jpg',2,'详情内容3','2022-04-06 15:23:12','2022-04-06 15:23:12'),(4,'标题4','http://localhost:8080/mengchongxiaozhishi/upload/chongwu4.jpg',2,'详情内容4','2022-04-06 15:23:12','2022-04-06 15:23:12'),(5,'标题5','http://localhost:8080/mengchongxiaozhishi/upload/chongwu5.jpg',3,'详情内容5','2022-04-06 15:23:12','2022-04-06 15:23:12');

/*Table structure for table `chongwu_collection` */

DROP TABLE IF EXISTS `chongwu_collection`;

CREATE TABLE `chongwu_collection` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `chongwu_id` int(11) DEFAULT NULL COMMENT '萌宠专区',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `chongwu_collection_types` int(11) DEFAULT NULL COMMENT '类型',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '收藏时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show3 photoShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='萌宠专区收藏';

/*Data for the table `chongwu_collection` */

insert  into `chongwu_collection`(`id`,`chongwu_id`,`yonghu_id`,`chongwu_collection_types`,`insert_time`,`create_time`) values (1,1,2,1,'2022-04-06 15:23:12','2022-04-06 15:23:12'),(4,4,1,1,'2022-04-06 15:23:12','2022-04-06 15:23:12'),(5,5,3,1,'2022-04-06 15:23:12','2022-04-06 15:23:12'),(6,5,1,1,'2022-04-06 15:39:59','2022-04-06 15:39:59');

/*Table structure for table `chongwu_liuyan` */

DROP TABLE IF EXISTS `chongwu_liuyan`;

CREATE TABLE `chongwu_liuyan` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `chongwu_id` int(11) DEFAULT NULL COMMENT '萌宠专区',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `chongwu_liuyan_text` text COMMENT '留言内容',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '留言时间',
  `reply_text` text COMMENT '回复内容',
  `update_time` timestamp NULL DEFAULT NULL COMMENT '回复时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='萌宠专区留言';

/*Data for the table `chongwu_liuyan` */

insert  into `chongwu_liuyan`(`id`,`chongwu_id`,`yonghu_id`,`chongwu_liuyan_text`,`insert_time`,`reply_text`,`update_time`,`create_time`) values (1,1,2,'留言内容1','2022-04-06 15:23:12','回复信息1','2022-04-06 15:23:12','2022-04-06 15:23:12'),(2,2,2,'留言内容2','2022-04-06 15:23:12','回复信息2','2022-04-06 15:23:12','2022-04-06 15:23:12'),(3,3,2,'留言内容3','2022-04-06 15:23:12','回复信息3','2022-04-06 15:23:12','2022-04-06 15:23:12'),(4,4,2,'留言内容4','2022-04-06 15:23:12','回复信息4','2022-04-06 15:23:12','2022-04-06 15:23:12'),(5,5,3,'留言内容5','2022-04-06 15:23:12','回复信息5','2022-04-06 15:23:12','2022-04-06 15:23:12'),(6,1,1,'萌宠专区留言123','2022-04-06 15:39:44','管理回复123','2022-04-06 15:41:06','2022-04-06 15:39:44');

/*Table structure for table `chongwuxihu` */

DROP TABLE IF EXISTS `chongwuxihu`;

CREATE TABLE `chongwuxihu` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `chongwuxihu_name` varchar(200) DEFAULT NULL COMMENT '标题 Search111',
  `chongwuxihu_photo` varchar(200) DEFAULT NULL COMMENT '封面',
  `chongwuxihu_video` varchar(200) DEFAULT NULL COMMENT '教学视频',
  `chongwuxihu_types` int(11) DEFAULT NULL COMMENT '洗护类型 Search111',
  `chongwuxihu_content` text COMMENT '详情内容',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '发布日期',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show1 show2 photoShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='萌宠洗护';

/*Data for the table `chongwuxihu` */

insert  into `chongwuxihu`(`id`,`chongwuxihu_name`,`chongwuxihu_photo`,`chongwuxihu_video`,`chongwuxihu_types`,`chongwuxihu_content`,`insert_time`,`create_time`) values (1,'标题1','http://localhost:8080/mengchongxiaozhishi/upload/chongwu1.jpg','http://localhost:8080/mengchongxiaozhishi/upload/video.mp4',3,'详情内容1','2022-04-06 15:23:12','2022-04-06 15:23:12'),(2,'标题2','http://localhost:8080/mengchongxiaozhishi/upload/chongwu2.jpg','http://localhost:8080/mengchongxiaozhishi/upload/video.mp4',1,'详情内容2','2022-04-06 15:23:12','2022-04-06 15:23:12'),(3,'标题3','http://localhost:8080/mengchongxiaozhishi/upload/chongwu3.jpg','http://localhost:8080/mengchongxiaozhishi/upload/video.mp4',2,'详情内容3','2022-04-06 15:23:12','2022-04-06 15:23:12'),(4,'标题4','http://localhost:8080/mengchongxiaozhishi/upload/chongwu4.jpg','http://localhost:8080/mengchongxiaozhishi/upload/video.mp4',2,'详情内容4','2022-04-06 15:23:12','2022-04-06 15:23:12'),(5,'标题5','http://localhost:8080/mengchongxiaozhishi/upload/chongwu5.jpg','http://localhost:8080/mengchongxiaozhishi/upload/video.mp4',1,'详情内容5','2022-04-06 15:23:12','2022-04-06 15:23:12');

/*Table structure for table `chongwuxihu_collection` */

DROP TABLE IF EXISTS `chongwuxihu_collection`;

CREATE TABLE `chongwuxihu_collection` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `chongwuxihu_id` int(11) DEFAULT NULL COMMENT '萌宠洗护',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `chongwuxihu_collection_types` int(11) DEFAULT NULL COMMENT '类型',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '收藏时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show3 photoShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='萌宠洗护收藏';

/*Data for the table `chongwuxihu_collection` */

insert  into `chongwuxihu_collection`(`id`,`chongwuxihu_id`,`yonghu_id`,`chongwuxihu_collection_types`,`insert_time`,`create_time`) values (1,1,3,1,'2022-04-06 15:23:12','2022-04-06 15:23:12'),(2,2,3,1,'2022-04-06 15:23:12','2022-04-06 15:23:12'),(3,3,3,1,'2022-04-06 15:23:12','2022-04-06 15:23:12'),(4,4,3,1,'2022-04-06 15:23:12','2022-04-06 15:23:12'),(5,5,2,1,'2022-04-06 15:23:12','2022-04-06 15:23:12'),(6,2,1,1,'2022-04-06 15:40:04','2022-04-06 15:40:04');

/*Table structure for table `chongwuxihu_liuyan` */

DROP TABLE IF EXISTS `chongwuxihu_liuyan`;

CREATE TABLE `chongwuxihu_liuyan` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `chongwuxihu_id` int(11) DEFAULT NULL COMMENT '萌宠洗护',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `chongwuxihu_liuyan_text` text COMMENT '留言内容',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '留言时间',
  `reply_text` text COMMENT '回复内容',
  `update_time` timestamp NULL DEFAULT NULL COMMENT '回复时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='萌宠洗护留言';

/*Data for the table `chongwuxihu_liuyan` */

insert  into `chongwuxihu_liuyan`(`id`,`chongwuxihu_id`,`yonghu_id`,`chongwuxihu_liuyan_text`,`insert_time`,`reply_text`,`update_time`,`create_time`) values (1,1,2,'留言内容1','2022-04-06 15:23:12','回复信息1','2022-04-06 15:23:12','2022-04-06 15:23:12'),(2,2,1,'留言内容2','2022-04-06 15:23:12','回复信息2','2022-04-06 15:23:12','2022-04-06 15:23:12'),(3,3,3,'留言内容3','2022-04-06 15:23:12','回复信息3','2022-04-06 15:23:12','2022-04-06 15:23:12'),(4,4,3,'留言内容4','2022-04-06 15:23:12','回复信息4','2022-04-06 15:23:12','2022-04-06 15:23:12'),(5,5,2,'留言内容5','2022-04-06 15:23:12','回复信息5','2022-04-06 15:23:12','2022-04-06 15:23:12'),(6,1,1,'洗护视频留言123','2022-04-06 15:39:01','回复123','2022-04-06 15:41:15','2022-04-06 15:39:01');

/*Table structure for table `config` */

DROP TABLE IF EXISTS `config`;

CREATE TABLE `config` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(100) NOT NULL COMMENT '配置参数名称',
  `value` varchar(100) DEFAULT NULL COMMENT '配置参数值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='配置文件';

/*Data for the table `config` */

insert  into `config`(`id`,`name`,`value`) values (1,'轮播图1','http://localhost:8080/mengchongxiaozhishi/upload/config1.jpg'),(2,'轮播图2','http://localhost:8080/mengchongxiaozhishi/upload/config2.jpg'),(3,'轮播图3','http://localhost:8080/mengchongxiaozhishi/upload/config3.jpg');

/*Table structure for table `dictionary` */

DROP TABLE IF EXISTS `dictionary`;

CREATE TABLE `dictionary` (
  `id` int(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dic_code` varchar(200) DEFAULT NULL COMMENT '字段',
  `dic_name` varchar(200) DEFAULT NULL COMMENT '字段名',
  `code_index` int(11) DEFAULT NULL COMMENT '编码',
  `index_name` varchar(200) DEFAULT NULL COMMENT '编码名字  Search111 ',
  `super_id` int(11) DEFAULT NULL COMMENT '父字段id',
  `beizhu` varchar(200) DEFAULT NULL COMMENT '备注',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='字典表';

/*Data for the table `dictionary` */

insert  into `dictionary`(`id`,`dic_code`,`dic_name`,`code_index`,`index_name`,`super_id`,`beizhu`,`create_time`) values (1,'chongwu_types','萌宠类型',1,'萌宠类型1',NULL,NULL,'2022-04-06 15:21:30'),(2,'chongwu_types','萌宠类型',2,'萌宠类型2',NULL,NULL,'2022-04-06 15:21:30'),(3,'chongwu_types','萌宠类型',3,'萌宠类型3',NULL,NULL,'2022-04-06 15:21:30'),(4,'chongwu_collection_types','收藏表类型',1,'收藏',NULL,NULL,'2022-04-06 15:21:30'),(5,'chongwuxihu_types','洗护类型',1,'洗护类型1',NULL,NULL,'2022-04-06 15:21:30'),(6,'chongwuxihu_types','洗护类型',2,'洗护类型2',NULL,NULL,'2022-04-06 15:21:30'),(7,'chongwuxihu_types','洗护类型',3,'洗护类型3',NULL,NULL,'2022-04-06 15:21:30'),(8,'chongwuxihu_collection_types','收藏表类型',1,'收藏',NULL,NULL,'2022-04-06 15:21:30'),(9,'news_types','公告类型',1,'公告类型1',NULL,NULL,'2022-04-06 15:21:30'),(10,'news_types','公告类型',2,'公告类型2',NULL,NULL,'2022-04-06 15:21:30'),(11,'news_types','公告类型',3,'公告类型3',NULL,NULL,'2022-04-06 15:21:30'),(12,'sex_types','性别类型',1,'男',NULL,NULL,'2022-04-06 15:21:30'),(13,'sex_types','性别类型',2,'女',NULL,NULL,'2022-04-06 15:21:30'),(14,'forum_state_types','帖子状态',1,'发帖',NULL,NULL,'2022-04-06 15:21:30'),(15,'forum_state_types','帖子状态',2,'回帖',NULL,NULL,'2022-04-06 15:21:30');

/*Table structure for table `forum` */

DROP TABLE IF EXISTS `forum`;

CREATE TABLE `forum` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `forum_name` varchar(200) DEFAULT NULL COMMENT '帖子标题  Search111 ',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `users_id` int(11) DEFAULT NULL COMMENT '管理员',
  `forum_content` text COMMENT '发布内容',
  `super_ids` int(11) DEFAULT NULL COMMENT '父id',
  `forum_state_types` int(11) DEFAULT NULL COMMENT '帖子状态',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '发帖时间',
  `update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show2',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='萌宠论坛';

/*Data for the table `forum` */

insert  into `forum`(`id`,`forum_name`,`yonghu_id`,`users_id`,`forum_content`,`super_ids`,`forum_state_types`,`insert_time`,`update_time`,`create_time`) values (1,'帖子标题1',1,NULL,'发布内容1',NULL,1,'2022-04-06 15:23:12','2022-04-06 15:23:12','2022-04-06 15:23:12'),(2,'帖子标题2',2,NULL,'发布内容2',NULL,1,'2022-04-06 15:23:12','2022-04-06 15:23:12','2022-04-06 15:23:12'),(3,'帖子标题3',1,NULL,'发布内容3',NULL,1,'2022-04-06 15:23:12','2022-04-06 15:23:12','2022-04-06 15:23:12'),(4,'帖子标题4',3,NULL,'发布内容4',NULL,1,'2022-04-06 15:23:12','2022-04-06 15:23:12','2022-04-06 15:23:12'),(5,'帖子标题5',2,NULL,'发布内容5',NULL,1,'2022-04-06 15:23:12','2022-04-06 15:23:12','2022-04-06 15:23:12'),(6,NULL,1,NULL,'论坛交流123',5,2,'2022-04-06 15:40:17',NULL,'2022-04-06 15:40:17'),(7,NULL,NULL,1,'管理评论123',5,2,'2022-04-06 15:41:30',NULL,'2022-04-06 15:41:30');

/*Table structure for table `news` */

DROP TABLE IF EXISTS `news`;

CREATE TABLE `news` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `news_name` varchar(200) DEFAULT NULL COMMENT '公告标题  Search111 ',
  `news_types` int(11) DEFAULT NULL COMMENT '公告类型  Search111 ',
  `news_photo` varchar(200) DEFAULT NULL COMMENT '公告图片',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '添加时间',
  `news_content` text COMMENT '公告详情',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show1 show2 nameShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='公告信息';

/*Data for the table `news` */

insert  into `news`(`id`,`news_name`,`news_types`,`news_photo`,`insert_time`,`news_content`,`create_time`) values (1,'公告标题1',2,'http://localhost:8080/mengchongxiaozhishi/upload/news1.jpg','2022-04-06 15:23:12','公告详情1','2022-04-06 15:23:12'),(2,'公告标题2',1,'http://localhost:8080/mengchongxiaozhishi/upload/news2.jpg','2022-04-06 15:23:12','公告详情2','2022-04-06 15:23:12'),(3,'公告标题3',2,'http://localhost:8080/mengchongxiaozhishi/upload/news3.jpg','2022-04-06 15:23:12','公告详情3','2022-04-06 15:23:12'),(4,'公告标题4',2,'http://localhost:8080/mengchongxiaozhishi/upload/news4.jpg','2022-04-06 15:23:12','公告详情4','2022-04-06 15:23:12'),(5,'公告标题5',1,'http://localhost:8080/mengchongxiaozhishi/upload/news5.jpg','2022-04-06 15:23:12','公告详情5','2022-04-06 15:23:12');

/*Table structure for table `token` */

DROP TABLE IF EXISTS `token`;

CREATE TABLE `token` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `userid` bigint(20) NOT NULL COMMENT '用户id',
  `username` varchar(100) NOT NULL COMMENT '用户名',
  `tablename` varchar(100) DEFAULT NULL COMMENT '表名',
  `role` varchar(100) DEFAULT NULL COMMENT '角色',
  `token` varchar(200) NOT NULL COMMENT '密码',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
  `expiratedtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '过期时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='token表';

/*Data for the table `token` */

insert  into `token`(`id`,`userid`,`username`,`tablename`,`role`,`token`,`addtime`,`expiratedtime`) values (1,1,'admin','users','管理员','smbp5apba9k64wneyi5t1l5n71d5bdtw','2022-04-06 15:33:54','2022-04-06 16:33:54'),(2,1,'a1','yonghu','用户','yjzqt1oiattrzs4u2pj9wopif5q4a0m5','2022-04-06 15:34:01','2022-04-06 16:41:53');

/*Table structure for table `users` */

DROP TABLE IF EXISTS `users`;

CREATE TABLE `users` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(100) NOT NULL COMMENT '用户名',
  `password` varchar(100) NOT NULL COMMENT '密码',
  `role` varchar(100) DEFAULT '管理员' COMMENT '角色',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户表';

/*Data for the table `users` */

insert  into `users`(`id`,`username`,`password`,`role`,`addtime`) values (1,'admin','admin','管理员','2022-05-01 00:00:00');

/*Table structure for table `yonghu` */

DROP TABLE IF EXISTS `yonghu`;

CREATE TABLE `yonghu` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(200) DEFAULT NULL COMMENT '账户',
  `password` varchar(200) DEFAULT NULL COMMENT '密码',
  `yonghu_name` varchar(200) DEFAULT NULL COMMENT '用户姓名 Search111 ',
  `yonghu_photo` varchar(200) DEFAULT NULL COMMENT '头像',
  `yonghu_phone` varchar(200) DEFAULT NULL COMMENT '手机号',
  `yonghu_email` varchar(200) DEFAULT NULL COMMENT '电子邮箱',
  `sex_types` int(11) DEFAULT NULL COMMENT '性别 Search111 ',
  `yonghu_delete` int(11) DEFAULT '1' COMMENT '假删',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='用户';

/*Data for the table `yonghu` */

insert  into `yonghu`(`id`,`username`,`password`,`yonghu_name`,`yonghu_photo`,`yonghu_phone`,`yonghu_email`,`sex_types`,`yonghu_delete`,`create_time`) values (1,'a1','123456','用户姓名1','http://localhost:8080/mengchongxiaozhishi/upload/yonghu1.jpg','17703786901','1@qq.com',2,1,'2022-04-06 15:23:12'),(2,'a2','123456','用户姓名2','http://localhost:8080/mengchongxiaozhishi/upload/yonghu2.jpg','17703786902','2@qq.com',1,1,'2022-04-06 15:23:12'),(3,'a3','123456','用户姓名3','http://localhost:8080/mengchongxiaozhishi/upload/yonghu3.jpg','17703786903','3@qq.com',2,1,'2022-04-06 15:23:12');

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

写JAVA代码的人

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值