计算机毕业设计 基于java的高校竞赛和考级查询系统的设计与实现 Java实战项目 附源码+文档+视频讲解

博主介绍:✌从事软件开发10年之余,专注于Java技术领域、Python人工智能及数据挖掘、小程序项目开发和Android项目开发等。CSDN、掘金、华为云、InfoQ、阿里云等平台优质作者✌

🍅文末获取源码联系🍅

👇🏻 精彩专栏推荐订阅👇🏻 不然下次找不到哟


计算机毕业设计题目《1000套》

目录

一.前言介绍及开发技术

二.功能设计

三.功能截图

四.数据库表结构设计

五.关键代码

六.论文目录参考

七.源码获取


一.前言介绍及开发技术

本高校竞赛和考级查询系统分为管理员还有用户两个权限,管理员可以管理用户的基本信息内容,可以管理公告信息以及竞赛信息,能够与用户进行相互交流等操作,用户可以查看竞赛信息,可以查看公告以及查看管理员回复信息等操作。

该高校竞赛和考级查询系统采用的是WEB应用程序开发中最受欢迎的B/S三层结构模式,使用占用空间小但功能齐全的MySQL数据库进行数据的存储操作,系统开发技术使用到了JSP技术。

二.功能设计

本次开发的高校竞赛和考级查询系统实现了字典管理、公告管理、教务处管理员管理、竞赛管理、竞赛收藏管理、竞赛留言管理、竞赛报名管理、学院负责人管理、学生管理、指导老师管理、管理员管理等功能。

三.功能截图

系统首页可以查看各个公告和各个竞赛。

竞赛功能模块可以对所选竞赛进行报名和留言以及选择竞赛指导老师。

个人中心模块可以对个人信息进行更新和修改。

竞赛列表页面提供给管理员的功能有:查看竞赛、新增竞赛、修改竞赛、删除竞赛等。

管理员可以对公告信息进行管理,可以新增公告信息,修改公告信息,删除无效的公告信息。

公告类型管理页面显示所有公告类型,在此页面既可以让管理员添加新的公告信息类型,也能对已有的公告类型信息执行编辑更新,失效的公告类型信息也能让管理员快速删除。

指导老师可以查看学生竞赛作品、获奖等级、作品评分以及评审意见。

学院负责人可以对竞赛学生参赛作品、指导老师进行审核和评分,给予建议。

四.数据库表结构设计

sql 复制代码
CREATE TABLE `config` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(100) DEFAULT 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,'轮播图1111','upload/config1.jpg'),(2,'轮播图2','upload/config2.jpg'),(3,'轮播图3','upload/config3.jpg');

/*Table structure for table `dictionary` */

DROP TABLE IF EXISTS `dictionary`;

CREATE TABLE `dictionary` (
  `id` bigint(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=23 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,'sex_types','性别类型',1,'男',NULL,NULL,'2023-03-13 11:35:36'),(2,'sex_types','性别类型',2,'女',NULL,NULL,'2023-03-13 11:35:36'),(3,'jingsai_types','竞赛类型',1,'竞赛类型1',NULL,NULL,'2023-03-13 11:35:36'),(4,'jingsai_types','竞赛类型',2,'竞赛类型2',NULL,NULL,'2023-03-13 11:35:36'),(5,'jingsai_types','竞赛类型',3,'竞赛类型3',NULL,NULL,'2023-03-13 11:35:36'),(6,'jingsai_types','竞赛类型',4,'竞赛类型4',NULL,NULL,'2023-03-13 11:35:36'),(7,'jingsai_collection_types','收藏表类型',1,'收藏',NULL,NULL,'2023-03-13 11:35:36'),(8,'jingsai_yuyue_types','竞赛状态',101,'已报名',NULL,NULL,'2023-03-13 11:35:36'),(9,'jingsai_yuyue_types','竞赛状态',102,'已取消报名',NULL,NULL,'2023-03-13 11:35:36'),(10,'jingsai_yuyue_types','竞赛状态',103,'已同意报名',NULL,NULL,'2023-03-13 11:35:36'),(11,'jingsai_yuyue_types','竞赛状态',104,'已上传报名作品',NULL,NULL,'2023-03-13 11:35:36'),(12,'jingsai_yuyue_types','竞赛状态',106,'已拒绝报名',NULL,NULL,'2023-03-13 11:35:36'),(13,'jingsai_yuyue_types','竞赛状态',107,'已打分',NULL,NULL,'2023-03-13 11:35:36'),(14,'jingsai_yuyue_yesno_types','报名状态',1,'待审核',NULL,NULL,'2023-03-13 11:35:36'),(15,'jingsai_yuyue_yesno_types','报名状态',2,'同意报名',NULL,NULL,'2023-03-13 11:35:36'),(16,'jingsai_yuyue_yesno_types','报名状态',3,'拒绝报名',NULL,NULL,'2023-03-13 11:35:36'),(17,'jingsai_yuyue_jidengjiang_types','几等奖',1,'一等奖',NULL,NULL,'2023-03-13 11:35:37'),(18,'jingsai_yuyue_jidengjiang_types','几等奖',2,'二等奖',NULL,NULL,'2023-03-13 11:35:37'),(19,'jingsai_yuyue_jidengjiang_types','几等奖',3,'三等奖',NULL,NULL,'2023-03-13 11:35:37'),(20,'gonggao_types','公告类型',1,'公告类型1',NULL,NULL,'2023-03-13 11:35:37'),(21,'gonggao_types','公告类型',2,'公告类型2',NULL,NULL,'2023-03-13 11:35:37'),(22,'jingsai_types','竞赛类型',5,'竞赛类型5',NULL,'','2023-03-13 14:01:20');

/*Table structure for table `gonggao` */

DROP TABLE IF EXISTS `gonggao`;

CREATE TABLE `gonggao` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `gonggao_name` varchar(200) DEFAULT NULL COMMENT '公告名称 Search111  ',
  `gonggao_photo` varchar(200) DEFAULT NULL COMMENT '公告图片 ',
  `gonggao_types` int(11) NOT NULL COMMENT '公告类型 Search111 ',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '公告发布时间 ',
  `gonggao_content` text COMMENT '公告详情 ',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show1 show2 nameShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='公告';

/*Data for the table `gonggao` */

insert  into `gonggao`(`id`,`gonggao_name`,`gonggao_photo`,`gonggao_types`,`insert_time`,`gonggao_content`,`create_time`) values (1,'公告名称1','upload/gonggao1.jpg',1,'2023-03-13 11:35:48','公告详情1','2023-03-13 11:35:48'),(2,'公告名称2','upload/gonggao2.jpg',1,'2023-03-13 11:35:48','公告详情2','2023-03-13 11:35:48'),(3,'公告名称3','upload/gonggao3.jpg',1,'2023-03-13 11:35:48','公告详情3','2023-03-13 11:35:48'),(4,'公告名称4','upload/gonggao4.jpg',2,'2023-03-13 11:35:48','公告详情4','2023-03-13 11:35:48'),(5,'公告名称5','upload/gonggao5.jpg',2,'2023-03-13 11:35:48','公告详情5','2023-03-13 11:35:48'),(6,'公告名称6','upload/gonggao6.jpg',2,'2023-03-13 11:35:48','公告详情6','2023-03-13 11:35:48'),(7,'公告名称7','upload/gonggao7.jpg',1,'2023-03-13 11:35:48','公告详情7','2023-03-13 11:35:48'),(8,'公告名称8','upload/gonggao8.jpg',1,'2023-03-13 11:35:48','公告详情8','2023-03-13 11:35:48'),(9,'公告名称9','upload/gonggao9.jpg',1,'2023-03-13 11:35:48','公告详情9','2023-03-13 11:35:48'),(10,'公告名称10','upload/gonggao10.jpg',2,'2023-03-13 11:35:48','公告详情10','2023-03-13 11:35:48'),(11,'公告名称11','upload/gonggao11.jpg',1,'2023-03-13 11:35:48','公告详情11','2023-03-13 11:35:48'),(12,'公告名称12','upload/gonggao12.jpg',1,'2023-03-13 11:35:48','公告详情12','2023-03-13 11:35:48'),(13,'公告名称13','upload/gonggao13.jpg',2,'2023-03-13 11:35:48','公告详情13','2023-03-13 11:35:48'),(14,'公告名称14','upload/gonggao14.jpg',2,'2023-03-13 11:35:48','公告详情14','2023-03-13 11:35:48');

/*Table structure for table `jiaowuchuguanliyuan` */

DROP TABLE IF EXISTS `jiaowuchuguanliyuan`;

CREATE TABLE `jiaowuchuguanliyuan` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(200) DEFAULT NULL COMMENT '账户',
  `password` varchar(200) DEFAULT NULL COMMENT '密码',
  `jiaowuchuguanliyuan_name` varchar(200) DEFAULT NULL COMMENT '教务处管理员姓名 Search111 ',
  `jiaowuchuguanliyuan_phone` varchar(200) DEFAULT NULL COMMENT '教务处管理员手机号',
  `jiaowuchuguanliyuan_id_number` varchar(200) DEFAULT NULL COMMENT '教务处管理员身份证号',
  `jiaowuchuguanliyuan_photo` varchar(200) DEFAULT NULL COMMENT '教务处管理员头像',
  `sex_types` int(11) DEFAULT NULL COMMENT '性别',
  `jiaowuchuguanliyuan_email` varchar(200) DEFAULT NULL COMMENT '教务处管理员邮箱',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='教务处管理员';

/*Data for the table `jiaowuchuguanliyuan` */

insert  into `jiaowuchuguanliyuan`(`id`,`username`,`password`,`jiaowuchuguanliyuan_name`,`jiaowuchuguanliyuan_phone`,`jiaowuchuguanliyuan_id_number`,`jiaowuchuguanliyuan_photo`,`sex_types`,`jiaowuchuguanliyuan_email`,`create_time`) values (1,'a1','123456','教务处管理员姓名1','17703786901','410224199010102001','upload/jiaowuchuguanliyuan1.jpg',2,'1@qq.com','2023-03-13 11:35:48'),(2,'a2','123456','教务处管理员姓名2','17703786902','410224199010102002','upload/jiaowuchuguanliyuan2.jpg',2,'2@qq.com','2023-03-13 11:35:48'),(3,'a3','123456','教务处管理员姓名3','17703786903','410224199010102003','upload/jiaowuchuguanliyuan3.jpg',1,'3@qq.com','2023-03-13 11:35:48');

/*Table structure for table `jingsai` */

DROP TABLE IF EXISTS `jingsai`;

CREATE TABLE `jingsai` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `jingsai_name` varchar(200) DEFAULT NULL COMMENT '竞赛名称  Search111 ',
  `jingsai_uuid_number` varchar(200) DEFAULT NULL COMMENT '竞赛编号',
  `jingsai_photo` varchar(200) DEFAULT NULL COMMENT '竞赛照片',
  `jingsai_types` int(11) DEFAULT NULL COMMENT '竞赛类型 Search111',
  `jingsai_clicknum` int(11) DEFAULT NULL COMMENT '竞赛热度',
  `baomingjiezhi_time` timestamp NULL DEFAULT NULL COMMENT '报名截止时间',
  `jingsai_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=15 DEFAULT CHARSET=utf8 COMMENT='竞赛';

/*Data for the table `jingsai` */

insert  into `jingsai`(`id`,`yonghu_id`,`jingsai_name`,`jingsai_uuid_number`,`jingsai_photo`,`jingsai_types`,`jingsai_clicknum`,`baomingjiezhi_time`,`jingsai_content`,`insert_time`,`create_time`) values (1,3,'竞赛名称1','1678678548429','upload/jingsai1.jpg',1,177,'2023-07-13 11:35:48','竞赛内容1','2023-03-13 11:35:48','2023-03-13 11:35:48'),(2,3,'竞赛名称2','1678678548402','upload/jingsai2.jpg',2,4,'2023-07-13 11:35:48','竞赛内容2','2023-03-13 11:35:48','2023-03-13 11:35:48'),(3,1,'竞赛名称3','1678678548476','upload/jingsai3.jpg',2,21,'2023-07-13 11:35:48','竞赛内容3','2023-03-13 11:35:48','2023-03-13 11:35:48'),(4,2,'竞赛名称4','1678678548410','upload/jingsai4.jpg',1,397,'2023-07-13 11:35:48','竞赛内容4','2023-03-13 11:35:48','2023-03-13 11:35:48'),(5,2,'竞赛名称5','1678678548475','upload/jingsai5.jpg',1,270,'2023-07-13 11:35:48','竞赛内容5','2023-03-13 11:35:48','2023-03-13 11:35:48'),(6,3,'竞赛名称6','1678678548473','upload/jingsai6.jpg',3,379,'2023-07-13 11:35:48','竞赛内容6','2023-03-13 11:35:48','2023-03-13 11:35:48'),(7,3,'竞赛名称7','1678678548475','upload/jingsai7.jpg',4,318,'2023-07-13 11:35:48','竞赛内容7','2023-03-13 11:35:48','2023-03-13 11:35:48'),(8,3,'竞赛名称8','1678678548391','upload/jingsai8.jpg',1,136,'2023-07-13 11:35:48','竞赛内容8','2023-03-13 11:35:48','2023-03-13 11:35:48'),(9,2,'竞赛名称9','1678678548446','upload/jingsai9.jpg',2,20,'2023-07-13 11:35:48','竞赛内容9','2023-03-13 11:35:48','2023-03-13 11:35:48'),(10,3,'竞赛名称10','1678678548421','upload/jingsai10.jpg',1,234,'2023-07-13 11:35:48','竞赛内容10','2023-03-13 11:35:48','2023-03-13 11:35:48'),(11,1,'竞赛名称11','1678678548456','upload/jingsai11.jpg',2,80,'2023-07-13 11:35:48','竞赛内容11','2023-03-13 11:35:48','2023-03-13 11:35:48'),(12,1,'竞赛名称12','1678678548404','upload/jingsai12.jpg',3,485,'2023-07-13 11:35:48','竞赛内容12','2023-03-13 11:35:48','2023-03-13 11:35:48'),(13,2,'竞赛名称13','1678678548470','upload/jingsai13.jpg',2,182,'2023-07-13 11:35:48','竞赛内容13','2023-03-13 11:35:48','2023-03-13 11:35:48'),(14,2,'竞赛名称14','1678678548451','upload/jingsai14.jpg',2,367,'2023-07-13 11:35:48','竞赛内容14','2023-03-13 11:35:48','2023-03-13 11:35:48');

/*Table structure for table `jingsai_collection` */

DROP TABLE IF EXISTS `jingsai_collection`;

CREATE TABLE `jingsai_collection` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `jingsai_id` int(11) DEFAULT NULL COMMENT '竞赛',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `jingsai_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=16 DEFAULT CHARSET=utf8 COMMENT='竞赛收藏';

/*Data for the table `jingsai_collection` */

insert  into `jingsai_collection`(`id`,`jingsai_id`,`yonghu_id`,`jingsai_collection_types`,`insert_time`,`create_time`) values (1,1,1,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(2,2,2,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(3,3,3,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(4,4,3,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(5,5,2,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(6,6,1,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(7,7,1,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(8,8,2,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(9,9,3,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(10,10,2,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(11,11,2,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(12,12,2,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(13,13,3,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(14,14,3,1,'2023-03-13 11:35:48','2023-03-13 11:35:48'),(15,4,4,1,'2023-03-13 13:55:02','2023-03-13 13:55:02');

/*Table structure for table `jingsai_liuyan` */

DROP TABLE IF EXISTS `jingsai_liuyan`;

CREATE TABLE `jingsai_liuyan` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `jingsai_id` int(11) DEFAULT NULL COMMENT '竞赛',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `jingsai_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=16 DEFAULT CHARSET=utf8 COMMENT='竞赛留言';

/*Data for the table `jingsai_liuyan` */

insert  into `jingsai_liuyan`(`id`,`jingsai_id`,`yonghu_id`,`jingsai_liuyan_text`,`insert_time`,`reply_text`,`update_time`,`create_time`) values (1,1,3,'留言内容1','2023-03-13 11:35:48','回复信息1','2023-03-13 11:35:48','2023-03-13 11:35:48'),(2,2,2,'留言内容2','2023-03-13 11:35:48','回复信息2','2023-03-13 11:35:48','2023-03-13 11:35:48'),(3,3,1,'留言内容3','2023-03-13 11:35:48','回复信息3','2023-03-13 11:35:48','2023-03-13 11:35:48'),(4,4,1,'留言内容4','2023-03-13 11:35:48','回复信息4','2023-03-13 11:35:48','2023-03-13 11:35:48'),(5,5,2,'留言内容5','2023-03-13 11:35:48','回复信息5','2023-03-13 11:35:48','2023-03-13 11:35:48'),(6,6,3,'留言内容6','2023-03-13 11:35:48','回复信息6','2023-03-13 11:35:48','2023-03-13 11:35:48'),(7,7,1,'留言内容7','2023-03-13 11:35:48','回复信息7','2023-03-13 11:35:48','2023-03-13 11:35:48'),(8,8,3,'留言内容8','2023-03-13 11:35:48','回复信息8','2023-03-13 11:35:48','2023-03-13 11:35:48'),(9,9,2,'留言内容9','2023-03-13 11:35:48','回复信息9','2023-03-13 11:35:48','2023-03-13 11:35:48'),(10,10,3,'留言内容10','2023-03-13 11:35:48','回复信息10','2023-03-13 11:35:48','2023-03-13 11:35:48'),(11,11,1,'留言内容11','2023-03-13 11:35:48','回复信息11','2023-03-13 11:35:48','2023-03-13 11:35:48'),(12,12,1,'留言内容12','2023-03-13 11:35:48','回复信息12','2023-03-13 11:35:48','2023-03-13 11:35:48'),(13,13,1,'留言内容13','2023-03-13 11:35:48','回复信息13','2023-03-13 11:35:48','2023-03-13 11:35:48'),(14,14,2,'留言内容14','2023-03-13 11:35:48','回复信息14','2023-03-13 11:35:48','2023-03-13 11:35:48'),(15,4,4,'hhhhh','2023-03-13 13:55:06','后悔何及','2023-03-13 14:02:42','2023-03-13 13:55:06');

/*Table structure for table `jingsai_yuyue` */

DROP TABLE IF EXISTS `jingsai_yuyue`;

CREATE TABLE `jingsai_yuyue` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `jingsai_yuyue_uuid_number` varchar(200) DEFAULT NULL COMMENT '报名编号 Search111 ',
  `jingsai_id` int(11) DEFAULT NULL COMMENT '竞赛',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `zhidaolaoshi_id` int(11) DEFAULT NULL COMMENT '指导老师',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '竞赛报名时间',
  `jingsai_yuyue_file` varchar(200) DEFAULT NULL COMMENT '竞赛作品',
  `jingsai_yuyue_types` int(11) DEFAULT NULL COMMENT '竞赛状态 Search111 ',
  `jingsai_yuyue_yesno_types` int(11) DEFAULT NULL COMMENT '报名状态 Search111 ',
  `jingsai_yuyue_yesno_text` text COMMENT '审核回复',
  `jingsai_yuyue_shenhe_time` timestamp NULL DEFAULT NULL COMMENT '审核时间',
  `jingsai_yuyue_jidengjiang_types` int(11) DEFAULT NULL COMMENT '几等奖 Search111 ',
  `jingsai_yuyue_dafen` decimal(10,2) DEFAULT NULL COMMENT '得分',
  `jingsai_yuyue_pingshen_text` text COMMENT '评审意见',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show3 listShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 COMMENT='竞赛报名';

/*Data for the table `jingsai_yuyue` */

insert  into `jingsai_yuyue`(`id`,`jingsai_yuyue_uuid_number`,`jingsai_id`,`yonghu_id`,`zhidaolaoshi_id`,`insert_time`,`jingsai_yuyue_file`,`jingsai_yuyue_types`,`jingsai_yuyue_yesno_types`,`jingsai_yuyue_yesno_text`,`jingsai_yuyue_shenhe_time`,`jingsai_yuyue_jidengjiang_types`,`jingsai_yuyue_dafen`,`jingsai_yuyue_pingshen_text`,`create_time`) values (1,'1678678548453',1,2,1,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',1,'75.59','评审意见1','2023-03-13 11:35:48'),(2,'1678678548427',2,2,1,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',1,'957.78','评审意见2','2023-03-13 11:35:48'),(3,'1678678548416',3,1,1,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',2,'963.65','评审意见3','2023-03-13 11:35:48'),(4,'1678678548411',4,3,1,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',2,'951.97','评审意见4','2023-03-13 11:35:48'),(5,'1678678548463',5,3,3,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',1,'617.55','评审意见5','2023-03-13 11:35:48'),(6,'1678678548479',6,1,2,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',2,'411.32','评审意见6','2023-03-13 11:35:48'),(7,'1678678548419',7,1,3,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',3,'672.25','评审意见7','2023-03-13 11:35:48'),(8,'1678678548479',8,3,2,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',3,'119.73','评审意见8','2023-03-13 11:35:48'),(9,'1678678548456',9,3,3,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',2,'648.77','评审意见9','2023-03-13 11:35:48'),(10,'1678678548470',10,3,3,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',1,'407.41','评审意见10','2023-03-13 11:35:48'),(11,'1678678548484',11,1,1,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',3,'243.41','评审意见11','2023-03-13 11:35:48'),(12,'1678678548428',12,1,2,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',2,'433.14','评审意见12','2023-03-13 11:35:48'),(13,'1678678548435',13,3,3,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',3,'429.39','评审意见13','2023-03-13 11:35:48'),(14,'1678678548477',14,2,1,'2023-03-13 11:35:48','upload/file.rar',107,1,'同意','2023-03-13 13:46:49',2,'817.97','评审意见14','2023-03-13 11:35:48'),(18,'1678685027367',5,1,2,'2023-03-13 13:23:49','upload/1678686494971.doc',107,2,'个地方时干啥的发给','2023-03-13 13:46:49',1,'98.50','地方都是房东说根深蒂固十多个固定死发的是方式','2023-03-13 13:23:49'),(19,'1678686917229',6,4,2,'2023-03-13 13:55:17',NULL,102,NULL,NULL,NULL,NULL,NULL,NULL,'2023-03-13 13:55:17'),(20,'1678686936979',6,4,2,'2023-03-13 13:55:37','upload/1678686987229.doc',104,2,'ggghsafdafa范德萨发生的','2023-03-13 13:56:17',NULL,NULL,NULL,'2023-03-13 13:55:37'),(21,'1678687112792',4,4,2,'2023-03-13 13:58:33','upload/1678687135000.doc',107,2,'哈哈哈哈','2023-03-13 13:58:45',2,'99.40','回复的股份的股份时代光华','2023-03-13 13:58:33');

/*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=7 DEFAULT CHARSET=utf8 COMMENT='token表';

/*Data for the table `token` */

insert  into `token`(`id`,`userid`,`username`,`tablename`,`role`,`token`,`addtime`,`expiratedtime`) values (1,1,'a1','yonghu','学生','yx0xsxy75uoqgt9drm9vz0rwzyi2k82z','2023-03-13 13:05:24','2023-03-13 14:05:24'),(2,1,'admin','users','管理员','2o73cx09ifwm92rflmwswrdrry4yk4oq','2023-03-13 13:24:11','2023-03-13 15:01:05'),(3,1,'a1','xuexiaofuzeren','学院负责人','hl2e1wh9apjmck26wxlpyvf39u1ipadm','2023-03-13 13:45:27','2023-03-13 15:00:16'),(4,1,'a1','zhidaolaoshi','指导老师','lfasycqofw50yhq2f840b39o5w2f8kky','2023-03-13 13:52:47','2023-03-13 14:59:46'),(5,4,'a5','yonghu','学生','p86o3xo964pchasj1qfa72pb3zcpzhrl','2023-03-13 13:54:41','2023-03-13 14:54:41'),(6,1,'a1','jiaowuchuguanliyuan','教务处管理员','7taf8gm861uvqyzm42yzvvwcrsnds5oz','2023-03-13 14:00:39','2023-03-13 15:00:40');

/*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','管理员','2023-03-13 11:35:36');

/*Table structure for table `xuexiaofuzeren` */

DROP TABLE IF EXISTS `xuexiaofuzeren`;

CREATE TABLE `xuexiaofuzeren` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(200) DEFAULT NULL COMMENT '账户',
  `password` varchar(200) DEFAULT NULL COMMENT '密码',
  `xuexiaofuzeren_name` varchar(200) DEFAULT NULL COMMENT '学院负责人姓名 Search111 ',
  `xuexiaofuzeren_phone` varchar(200) DEFAULT NULL COMMENT '学院负责人手机号',
  `xuexiaofuzeren_id_number` varchar(200) DEFAULT NULL COMMENT '学院负责人身份证号',
  `xuexiaofuzeren_photo` varchar(200) DEFAULT NULL COMMENT '学院负责人头像',
  `sex_types` int(11) DEFAULT NULL COMMENT '性别',
  `xuexiaofuzeren_email` varchar(200) DEFAULT NULL COMMENT '学院负责人邮箱',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='学院负责人';

/*Data for the table `xuexiaofuzeren` */

insert  into `xuexiaofuzeren`(`id`,`username`,`password`,`xuexiaofuzeren_name`,`xuexiaofuzeren_phone`,`xuexiaofuzeren_id_number`,`xuexiaofuzeren_photo`,`sex_types`,`xuexiaofuzeren_email`,`create_time`) values (1,'a1','123456','学院负责人姓名1','17703786901','410224199010102001','upload/xuexiaofuzeren1.jpg',2,'1@qq.com','2023-03-13 11:35:48'),(2,'a2','123456','学院负责人姓名2','17703786902','410224199010102002','upload/xuexiaofuzeren2.jpg',2,'2@qq.com','2023-03-13 11:35:48'),(3,'a3','123456','学院负责人姓名3','17703786903','410224199010102003','upload/xuexiaofuzeren3.jpg',2,'3@qq.com','2023-03-13 11:35:48');

/*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_phone` varchar(200) DEFAULT NULL COMMENT '学生手机号',
  `yonghu_id_number` varchar(200) DEFAULT NULL COMMENT '学生身份证号',
  `yonghu_photo` varchar(200) DEFAULT NULL COMMENT '学生头像',
  `sex_types` int(11) DEFAULT NULL COMMENT '性别',
  `yonghu_email` varchar(200) DEFAULT NULL COMMENT '学生邮箱',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='学生';

/*Data for the table `yonghu` */

insert  into `yonghu`(`id`,`username`,`password`,`yonghu_name`,`yonghu_phone`,`yonghu_id_number`,`yonghu_photo`,`sex_types`,`yonghu_email`,`create_time`) values (1,'a1','123456','学生姓名1','17703786901','410224199010102001','upload/yonghu1.jpg',2,'1@qq.com','2023-03-13 11:35:48'),(2,'a2','123456','学生姓名2','17703786902','410224199010102002','upload/yonghu2.jpg',1,'2@qq.com','2023-03-13 11:35:48'),(3,'a3','123456','学生姓名3','17703786903','410224199010102003','upload/yonghu3.jpg',1,'3@qq.com','2023-03-13 11:35:48'),(4,'a5','123456','张5','17788889999','410222444666665552','upload/1678686897443.jpg',2,'5@qq.com','2023-03-13 13:54:35');

/*Table structure for table `zhidaolaoshi` */

DROP TABLE IF EXISTS `zhidaolaoshi`;

CREATE TABLE `zhidaolaoshi` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(200) DEFAULT NULL COMMENT '账户',
  `password` varchar(200) DEFAULT NULL COMMENT '密码',
  `zhidaolaoshi_name` varchar(200) DEFAULT NULL COMMENT '指导老师姓名 Search111 ',
  `zhidaolaoshi_phone` varchar(200) DEFAULT NULL COMMENT '指导老师手机号',
  `zhidaolaoshi_id_number` varchar(200) DEFAULT NULL COMMENT '指导老师身份证号',
  `zhidaolaoshi_photo` varchar(200) DEFAULT NULL COMMENT '指导老师头像',
  `sex_types` int(11) DEFAULT NULL COMMENT '性别',
  `zhidaolaoshi_email` varchar(200) DEFAULT NULL COMMENT '指导老师邮箱',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='指导老师';

/*Data for the table `zhidaolaoshi` */

insert  into `zhidaolaoshi`(`id`,`username`,`password`,`zhidaolaoshi_name`,`zhidaolaoshi_phone`,`zhidaolaoshi_id_number`,`zhidaolaoshi_photo`,`sex_types`,`zhidaolaoshi_email`,`create_time`) values (1,'a1','123456','指导老师姓名1','17703786901','410224199010102001','upload/zhidaolaoshi1.jpg',1,'1@qq.com','2023-03-13 11:35:48'),(2,'a2','123456','指导老师姓名2','17703786902','410224199010102002','upload/zhidaolaoshi2.jpg',1,'2@qq.com','2023-03-13 11:35:48'),(3,'a3','123456','指导老师姓名3','17703786903','410224199010102003','upload/zhidaolaoshi3.jpg',1,'3@qq.com','2023-03-13 11:35:48');

/*!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 */;

五.关键代码

java 复制代码
package com.controller;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;

/**
 * 登录相关
 */
@RequestMapping("users")
@RestController
public class UserController{
	
	@Autowired
	private UserService userService;
	
	@Autowired
	private TokenService tokenService;

	/**
	 * 登录
	 */
	@IgnoreAuth
	@PostMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
		if(user==null || !user.getPassword().equals(password)) {
			return R.error("账号或密码不正确");
		}
		String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
		return R.ok().put("token", token);
	}
	
	/**
	 * 注册
	 */
	@IgnoreAuth
	@PostMapping(value = "/register")
	public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);
    	if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
    		return R.error("用户已存在");
    	}
        userService.insert(user);
        return R.ok();
    }

	/**
	 * 退出
	 */
	@GetMapping(value = "logout")
	public R logout(HttpServletRequest request) {
		request.getSession().invalidate();
		return R.ok("退出成功");
	}
	
	/**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
    	if(user==null) {
    		return R.error("账号不存在");
    	}
    	user.setPassword("123456");
        userService.update(user,null);
        return R.ok("密码已重置为:123456");
    }
	
	/**
     * 列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,UserEntity user){
        EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
    	PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/list")
    public R list( UserEntity user){
       	EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
      	ew.allEq(MPUtil.allEQMapPre( user, "user")); 
        return R.ok().put("data", userService.selectListView(ew));
    }

    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 获取用户的session用户信息
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){
    	Long id = (Long)request.getSession().getAttribute("userId");
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }

    /**
     * 保存
     */
    @PostMapping("/save")
    public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);
    	if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
    		return R.error("用户已存在");
    	}
        userService.insert(user);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);
    	UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));
    	if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
    		return R.error("用户名已存在。");
    	}
        userService.updateById(user);//全部更新
        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        userService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}

六.论文目录参考

七.源码获取

感谢大家的阅读,如有不懂的问题可以评论区交流或私聊!

喜欢文章可以点赞、收藏、关注、评论 啦 、👇🏻获取源码+V:jsjbysj88👇🏻

相关推荐
慧都小妮子7 分钟前
Spire.PDF for .NET【页面设置】演示:打开 PDF 时自动显示书签或缩略图
java·pdf·.net
m512711 分钟前
LinuxC语言
java·服务器·前端
IU宝15 分钟前
C/C++内存管理
java·c语言·c++
湫ccc15 分钟前
《Python基础》之pip换国内镜像源
开发语言·python·pip
瓜牛_gn16 分钟前
依赖注入注解
java·后端·spring
fhvyxyci16 分钟前
【C++之STL】摸清 string 的模拟实现(下)
开发语言·c++·string
hakesashou17 分钟前
Python中常用的函数介绍
java·网络·python
qq_4597300319 分钟前
C 语言面向对象
c语言·开发语言
佚先森26 分钟前
2024ARM网络验证 支持一键云注入引流弹窗注册机 一键脱壳APP加固搭建程序源码及教程
java·html
菜鸟学Python28 分钟前
Python 数据分析核心库大全!
开发语言·python·数据挖掘·数据分析