博主介绍:✌从事软件开发10年之余,专注于Java技术领域、Python人工智能及数据挖掘、小程序项目开发和Android项目开发等。CSDN、掘金、华为云、InfoQ、阿里云等平台优质作者✌
文末获取源码联系
精彩专栏推荐订阅 不然下次找不到哟
————————————————
计算机毕业设计《1000套》✌
目录
1、项目介绍及开发技术
1.1 项目介绍
1.2 开发技术
2、系统功能设计结构图
3、功能截图
4、数据库表结构设计
5、关键代码
5.1 项目管理Controller模块
5.2 项目管理Service模块
5.3 项目管理ServiceImpl模块
5.4 项目管理Dao模块
6、论文目录结构
7、源码获取
1、项目介绍及开发技术
1.1 项目介绍
信息数据从传统到当代,是一直在变革当中,突如其来的互联网让传统的信息管理看到了革命性的曙光,因为传统信息管理从时效性,还是安全性,还是可操作性等各个方面来讲,遇到了互联网时代才发现能补上自古以来的短板,有效的提升管理的效率和业务水平。传统的管理模式,时间越久管理的内容越多,也需要更多的人来对数据进行整理,并且数据的汇总查询方面效率也是极其的低下,并且数据安全方面永远不会保证安全性能。结合数据内容管理的种种缺点,在互联网时代都可以得到有效的补充。结合先进的互联网技术,开发符合需求的软件,让数据内容管理不管是从录入的及时性,查看的及时性还是汇总分析的及时性,都能让正确率达到最高,管理更加的科学和便捷。本次开发的项目申报系统实现了操作日志管理、字典管理、公告管理、留言板管理、资讯信息管理、项目管理、用户管理、专家管理、管理员管理等功能。系统用到了关系型数据库中王者MySql作为系统的数据库,有效的对数据进行安全的存储,有效的备份,对数据可靠性方面得到了保证。并且程序也具备程序需求的所有功能,使得操作性还是安全性都大大提高,让项目申报系统更能从理念走到现实,确确实实的让人们提升信息处理效率。
1.2 开发技术
Java开发语言、SpringBoot、MyBatisPlus、MySQL数据库、Maven、IDEA开发工具、JDK1.8+、Vue、HTML、CSS、JS。
2、系统功能设计结构图
3、功能截图
项目管理:对项目的增加、修改、删除、查看等功能进行操作。
公告信息管理: 管理员对公告信息进行新增公告,修改公告,删除公告等功能的操作。
公告类型管理:公告类型管理页面显示所有公告类型,在此页面既可以让管理员添加新的公告信息类型,也能对已有的公告类型信息执行编辑更新,失效的公告类型信息也能让管理员快速删除。
资讯信息管理 :新增资讯信息,修改资讯信息,删除资讯信息。
资讯信息类型管理:新增资讯信息类型,修改资讯信息类型,删除资讯信息类型。
4、数据库表结构设计
CREATE DATABASE /*!32312 IF NOT EXISTS*/`xiangmushenbaoxitong` /*!40100 DEFAULT CHARACTER SET utf8 */;USE `xiangmushenbaoxitong`;/*Table structure for table `caozuorizhi` */DROP TABLE IF EXISTS `caozuorizhi`;CREATE TABLE `caozuorizhi` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',`caozuorizhi_this_biao` varchar(200) DEFAULT NULL COMMENT '操作人所在表 Search111 ',`caozuorizhi_caozuobiao` varchar(200) DEFAULT NULL COMMENT '操作表 Search111 ',`caozuorizhi_caozuozhanghu` varchar(200) DEFAULT NULL COMMENT '操作账户 Search111 ',`caozuorizhi_caozuoleixing` varchar(200) DEFAULT NULL COMMENT '操作类型 Search111 ',`caozuorizhi_text` mediumtext COMMENT '操作内容 Search111 ',`insert_time` timestamp NULL DEFAULT NULL COMMENT '操作时间 Search111 ',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=259 DEFAULT CHARSET=utf8 COMMENT='操作日志';/*Data for the table `caozuorizhi` *//*Table structure for table `config` */DROP TABLE IF EXISTS `config`;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` */insertinto `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=20 DEFAULT CHARSET=utf8 COMMENT='字典';/*Data for the table `dictionary` */insertinto `dictionary`(`id`,`dic_code`,`dic_name`,`code_index`,`index_name`,`super_id`,`beizhu`,`create_time`) values (1,'sex_types','性别类型',1,'男',NULL,NULL,'2023-03-30 17:04:06'),(2,'sex_types','性别类型',2,'女',NULL,NULL,'2023-03-30 17:04:06'),(3,'jinyong_types','账户状态',1,'启用',NULL,NULL,'2023-03-30 17:04:06'),(4,'jinyong_types','账户状态',2,'禁用',NULL,NULL,'2023-03-30 17:04:06'),(5,'xiangmu_dengji_types','项目等级',1,'市级',NULL,NULL,'2023-03-30 17:04:06'),(6,'xiangmu_dengji_types','项目等级',2,'省级',NULL,NULL,'2023-03-30 17:04:06'),(7,'xiangmu_dengji_types','项目等级',3,'国家级',NULL,NULL,'2023-03-30 17:04:06'),(8,'xiangmu_types','项目类型',1,'项目类型1',NULL,NULL,'2023-03-30 17:04:06'),(9,'xiangmu_types','项目类型',2,'项目类型2',NULL,NULL,'2023-03-30 17:04:06'),(10,'xiangmu_types','项目类型',3,'项目类型3',NULL,NULL,'2023-03-30 17:04:06'),(11,'xiangmu_types','项目类型',4,'项目类型4',NULL,NULL,'2023-03-30 17:04:06'),(12,'xiangmu_yesno_types','审核状态',1,'待审核',NULL,NULL,'2023-03-30 17:04:06'),(13,'xiangmu_yesno_types','审核状态',2,'同意',NULL,NULL,'2023-03-30 17:04:06'),(14,'xiangmu_yesno_types','审核状态',3,'拒绝',NULL,NULL,'2023-03-30 17:04:06'),(15,'news_types','资讯类型',1,'资讯类型1',NULL,NULL,'2023-03-30 17:04:06'),(16,'news_types','资讯类型',2,'资讯类型2',NULL,NULL,'2023-03-30 17:04:06'),(17,'gonggao_types','公告类型',1,'公告类型1',NULL,NULL,'2023-03-30 17:04:06'),(18,'gonggao_types','公告类型',2,'公告类型2',NULL,NULL,'2023-03-30 17:04:06'),(19,'xiangmu_types','项目类型',5,'项目类型5',NULL,'','2023-03-31 10:17:43');/*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` longtext 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` */insertinto `gonggao`(`id`,`gonggao_name`,`gonggao_photo`,`gonggao_types`,`insert_time`,`gonggao_content`,`create_time`) values (1,'公告名称1','upload/gonggao1.jpg',2,'2023-03-30 17:17:59','公告详情1','2023-03-30 17:17:59'),(2,'公告名称2','upload/gonggao2.jpg',2,'2023-03-30 17:17:59','公告详情2','2023-03-30 17:17:59'),(3,'公告名称3','upload/gonggao3.jpg',1,'2023-03-30 17:17:59','公告详情3','2023-03-30 17:17:59'),(4,'公告名称4','upload/gonggao4.jpg',1,'2023-03-30 17:17:59','公告详情4','2023-03-30 17:17:59'),(5,'公告名称5','upload/gonggao5.jpg',2,'2023-03-30 17:17:59','公告详情5','2023-03-30 17:17:59'),(6,'公告名称6','upload/gonggao6.jpg',1,'2023-03-30 17:17:59','公告详情6','2023-03-30 17:17:59'),(7,'公告名称7','upload/gonggao7.jpg',2,'2023-03-30 17:17:59','公告详情7','2023-03-30 17:17:59'),(8,'公告名称8','upload/gonggao8.jpg',2,'2023-03-30 17:17:59','公告详情8','2023-03-30 17:17:59'),(9,'公告名称9','upload/gonggao9.jpg',1,'2023-03-30 17:17:59','公告详情9','2023-03-30 17:17:59'),(10,'公告名称10','upload/gonggao10.jpg',1,'2023-03-30 17:17:59','公告详情10','2023-03-30 17:17:59'),(11,'公告名称11','upload/gonggao11.jpg',1,'2023-03-30 17:17:59','公告详情11','2023-03-30 17:17:59'),(12,'公告名称12','upload/gonggao12.jpg',2,'2023-03-30 17:17:59','公告详情12','2023-03-30 17:17:59'),(13,'公告名称13','upload/gonggao13.jpg',1,'2023-03-30 17:17:59','公告详情13','2023-03-30 17:17:59'),(14,'公告名称14','upload/gonggao14.jpg',2,'2023-03-30 17:17:59','公告详情14','2023-03-30 17:17:59');/*Table structure for table `liuyan` */DROP TABLE IF EXISTS `liuyan`;CREATE TABLE `liuyan` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',`yonghu_id` int(11) DEFAULT NULL COMMENT '用户',`liuyan_name` varchar(200) DEFAULT NULL COMMENT '留言标题Search111 ',`liuyan_text` longtext COMMENT '留言内容',`insert_time` timestamp NULL DEFAULT NULL COMMENT '留言时间',`reply_text` longtext COMMENT '回复内容',`update_time` timestamp NULL DEFAULT NULL COMMENT '回复时间',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show2 nameShow',PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='留言板';/*Data for the table `liuyan` */insertinto `liuyan`(`id`,`yonghu_id`,`liuyan_name`,`liuyan_text`,`insert_time`,`reply_text`,`update_time`,`create_time`) values (1,3,'留言标题1','留言内容1','2023-03-30 17:17:59','回复信息1','2023-03-30 17:17:59','2023-03-30 17:17:59'),(2,1,'留言标题2','留言内容2','2023-03-30 17:17:59','回复信息2','2023-03-30 17:17:59','2023-03-30 17:17:59'),(3,1,'留言标题3','留言内容3','2023-03-30 17:17:59','回复信息3','2023-03-30 17:17:59','2023-03-30 17:17:59'),(4,1,'留言标题4','留言内容4','2023-03-30 17:17:59','回复信息4','2023-03-30 17:17:59','2023-03-30 17:17:59'),(5,3,'留言标题5','留言内容5','2023-03-30 17:17:59','回复信息5','2023-03-30 17:17:59','2023-03-30 17:17:59'),(6,3,'留言标题6','留言内容6','2023-03-30 17:17:59','回复信息6','2023-03-30 17:17:59','2023-03-30 17:17:59'),(7,1,'留言标题7','留言内容7','2023-03-30 17:17:59','回复信息7','2023-03-30 17:17:59','2023-03-30 17:17:59'),(8,1,'留言标题8','留言内容8','2023-03-30 17:17:59','回复信息8','2023-03-30 17:17:59','2023-03-30 17:17:59'),(9,3,'留言标题9','留言内容9','2023-03-30 17:17:59','回复信息9','2023-03-30 17:17:59','2023-03-30 17:17:59'),(10,3,'留言标题10','留言内容10','2023-03-30 17:17:59','回复信息10','2023-03-30 17:17:59','2023-03-30 17:17:59'),(11,3,'留言标题11','留言内容11','2023-03-30 17:17:59','回复信息11','2023-03-30 17:17:59','2023-03-30 17:17:59'),(12,2,'留言标题12','留言内容12','2023-03-30 17:17:59','回复信息12','2023-03-30 17:17:59','2023-03-30 17:17:59'),(13,2,'留言标题13','留言内容13','2023-03-30 17:17:59','回复信息13','2023-03-30 17:17:59','2023-03-30 17:17:59'),(14,3,'留言标题14','留言内容14','2023-03-30 17:17:59','回复信息14','2023-03-30 17:17:59','2023-03-30 17:17:59'),(15,4,'标题111','改大纲','2023-03-31 10:16:32','黑胡椒','2023-03-31 10:17:51','2023-03-31 10:16:32');/*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_photo` varchar(200) DEFAULT NULL COMMENT '资讯图片 ',`news_types` int(11) NOT NULL COMMENT '资讯类型 Search111',`insert_time` timestamp NULL DEFAULT NULL COMMENT '资讯发布时间 ',`news_content` longtext 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 `news` */insertinto `news`(`id`,`news_name`,`news_photo`,`news_types`,`insert_time`,`news_content`,`create_time`) values (1,'资讯名称1','upload/news1.jpg',1,'2023-03-30 17:17:59','资讯详情1','2023-03-30 17:17:59'),(2,'资讯名称2','upload/news2.jpg',2,'2023-03-30 17:17:59','资讯详情2','2023-03-30 17:17:59'),(3,'资讯名称3','upload/news3.jpg',2,'2023-03-30 17:17:59','资讯详情3','2023-03-30 17:17:59'),(4,'资讯名称4','upload/news4.jpg',1,'2023-03-30 17:17:59','资讯详情4','2023-03-30 17:17:59'),(5,'资讯名称5','upload/news5.jpg',1,'2023-03-30 17:17:59','资讯详情5','2023-03-30 17:17:59'),(6,'资讯名称6','upload/news6.jpg',1,'2023-03-30 17:17:59','资讯详情6','2023-03-30 17:17:59'),(7,'资讯名称7','upload/news7.jpg',2,'2023-03-30 17:17:59','资讯详情7','2023-03-30 17:17:59'),(8,'资讯名称8','upload/news8.jpg',1,'2023-03-30 17:17:59','资讯详情8','2023-03-30 17:17:59'),(9,'资讯名称9','upload/news9.jpg',1,'2023-03-30 17:17:59','资讯详情9','2023-03-30 17:17:59'),(10,'资讯名称10','upload/news10.jpg',2,'2023-03-30 17:17:59','资讯详情10','2023-03-30 17:17:59'),(11,'资讯名称11','upload/news11.jpg',2,'2023-03-30 17:17:59','资讯详情11','2023-03-30 17:17:59'),(12,'资讯名称12','upload/news12.jpg',2,'2023-03-30 17:17:59','资讯详情12','2023-03-30 17:17:59'),(13,'资讯名称13','upload/news13.jpg',1,'2023-03-30 17:17:59','资讯详情13','2023-03-30 17:17:59'),(14,'资讯名称14','upload/news14.jpg',2,'2023-03-30 17:17:59','资讯详情14','2023-03-30 17:17:59');/*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=5 DEFAULT CHARSET=utf8 COMMENT='token表';/*Data for the table `token` */insertinto `token`(`id`,`userid`,`username`,`tablename`,`role`,`token`,`addtime`,`expiratedtime`) values (1,1,'admin','users','管理员','5wc6d1y9hgvr5by12486kpt1686syrgb','2023-03-31 09:23:44','2023-03-31 11:22:37'),(2,3,'a3','yonghu','用户','u84laf6ckvr5uh7fkbemvmlwu362rw83','2023-03-31 09:27:26','2023-03-31 11:17:20'),(3,1,'a1','zhuanjia','专家','8zadrvgcq5hpvgx9qbxabf1yltbsidra','2023-03-31 10:11:59','2023-03-31 11:18:26'),(4,4,'a5','yonghu','用户','eadsihd4log3cv2red9s2rkgv85z48bg','2023-03-31 10:16:11','2023-03-31 11:16:12');/*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` */insertinto `users`(`id`,`username`,`password`,`role`,`addtime`) values (1,'admin','admin','管理员','2023-03-30 17:04:06');/*Table structure for table `xiangmu` */DROP TABLE IF EXISTS `xiangmu`;CREATE TABLE `xiangmu` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',`yonghu_id` int(11) DEFAULT NULL COMMENT '用户',`zhuanjia_id` int(11) DEFAULT NULL COMMENT '专家',`xiangmu_uuid_number` varchar(200) DEFAULT NULL COMMENT '项目编号',`xiangmu_name` varchar(200) DEFAULT NULL COMMENT '项目名称Search111 ',`xiangmu_photo` varchar(200) DEFAULT NULL COMMENT '项目照片',`xiangmu_address` varchar(200) DEFAULT NULL COMMENT '项目地点',`xiangmu_kaishi_time` timestamp NULL DEFAULT NULL COMMENT '项目开始时间',`xiangmu_jieshu_time` timestamp NULL DEFAULT NULL COMMENT '项目结束时间',`xiangmu_types` int(11) DEFAULT NULL COMMENT '项目类型 Search111',`xiangmu_dengji_types` int(11) DEFAULT NULL COMMENT '项目等级 Search111',`xiangmu_content` longtext COMMENT '项目介绍 ',`insert_time` timestamp NULL DEFAULT NULL COMMENT '录入时间',`xiangmu_yesno_types` int(11) DEFAULT NULL COMMENT '审核状态 Search111',`xiangmu_yesno_text` longtext COMMENT '审核意见',`xiangmu_shenhe_time` timestamp NULL DEFAULT NULL COMMENT '审核时间',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间show3 listShow',PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='项目';/*Data for the table `xiangmu` */insertinto `xiangmu`(`id`,`yonghu_id`,`zhuanjia_id`,`xiangmu_uuid_number`,`xiangmu_name`,`xiangmu_photo`,`xiangmu_address`,`xiangmu_kaishi_time`,`xiangmu_jieshu_time`,`xiangmu_types`,`xiangmu_dengji_types`,`xiangmu_content`,`insert_time`,`xiangmu_yesno_types`,`xiangmu_yesno_text`,`xiangmu_shenhe_time`,`create_time`) values (1,3,2,'1680167879791','项目名称1','upload/xiangmu1.jpg','项目地点1','2023-03-30 17:17:59','2023-03-30 17:17:59',3,1,'项目介绍1','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(2,3,2,'1680167879834','项目名称2','upload/xiangmu2.jpg','项目地点2','2023-03-30 17:17:59','2023-03-30 17:17:59',3,3,'项目介绍2','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(3,2,1,'1680167879802','项目名称3','upload/xiangmu3.jpg','项目地点3','2023-03-30 17:17:59','2023-03-30 17:17:59',1,3,'项目介绍3','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(4,2,1,'1680167879843','项目名称4','upload/xiangmu4.jpg','项目地点4','2023-03-30 17:17:59','2023-03-30 17:17:59',1,2,'项目介绍4','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(5,2,3,'1680167879779','项目名称5','upload/xiangmu5.jpg','项目地点5','2023-03-30 17:17:59','2023-03-30 17:17:59',2,3,'项目介绍5','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(6,1,1,'1680167879844','项目名称6','upload/xiangmu6.jpg','项目地点6','2023-03-30 17:17:59','2023-03-30 17:17:59',3,1,'项目介绍6','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(7,3,3,'1680167879850','项目名称7','upload/xiangmu7.jpg','项目地点7','2023-03-30 17:17:59','2023-03-30 17:17:59',2,3,'项目介绍7','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(8,3,3,'1680167879848','项目名称8','upload/xiangmu8.jpg','项目地点8','2023-03-30 17:17:59','2023-03-30 17:17:59',1,1,'项目介绍8','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(9,3,1,'1680167879859','项目名称9','upload/xiangmu9.jpg','项目地点9','2023-03-30 17:17:59','2023-03-30 17:17:59',3,1,'项目介绍9','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(10,3,3,'1680167879866','项目名称10','upload/xiangmu10.jpg','项目地点10','2023-03-30 17:17:59','2023-03-30 17:17:59',1,3,'项目介绍10','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(11,2,2,'1680167879871','项目名称11','upload/xiangmu11.jpg','项目地点11','2023-03-30 17:17:59','2023-03-30 17:17:59',1,2,'项目介绍11','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(12,3,3,'1680167879868','项目名称12','upload/xiangmu12.jpg','项目地点12','2023-03-30 17:17:59','2023-03-30 17:17:59',3,1,'项目介绍12','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(13,1,2,'1680167879826','项目名称13','upload/xiangmu13.jpg','项目地点13','2023-03-30 17:17:59','2023-03-30 17:17:59',4,2,'项目介绍13','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(14,1,1,'1680167879795','项目名称14','upload/xiangmu14.jpg','项目地点14','2023-03-30 17:17:59','2023-03-30 17:17:59',3,1,'项目介绍14','2023-03-30 17:17:59',2,'同意','2023-03-30 17:17:59','2023-03-30 17:17:59'),(15,3,1,'1680228079138','项目11','upload/1680228087580.jpg','项目地点','2023-04-01 00:00:00','2023-04-01 00:00:00',3,2,'固定死公司大概多少','2023-03-31 10:02:11',3,'沟沟壑壑','2023-03-31 10:12:09','2023-03-31 10:02:11'),(16,4,1,'1680229005457','项目333','upload/1680229010609.jpg','地点222','2023-04-01 00:00:00','2023-04-06 00:00:00',3,2,'合适的话啥都好说的','2023-03-31 10:17:07',2,'回家考虑','2023-03-31 10:18:44','2023-03-31 10:17:07');/*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 '用户邮箱',`jinyong_types` int(11) DEFAULT NULL COMMENT '账户状态 Search111 ',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='用户';/*Data for the table `yonghu` */insertinto `yonghu`(`id`,`username`,`password`,`yonghu_name`,`yonghu_phone`,`yonghu_id_number`,`yonghu_photo`,`sex_types`,`yonghu_email`,`jinyong_types`,`create_time`) values (1,'a1','123456','用户姓名1','17703786901','410224199010102001','upload/yonghu1.jpg',1,'1@qq.com',2,'2023-03-30 17:17:59'),(2,'a2','123456','用户姓名2','17703786902','410224199010102002','upload/yonghu2.jpg',2,'2@qq.com',1,'2023-03-30 17:17:59'),(3,'a3','123456','用户姓名3','17703786903','410224199010102003','upload/yonghu3.jpg',2,'3@qq.com',1,'2023-03-30 17:17:59'),(4,'a5','123456','张5','17788889999','444555666699999999','upload/1680229002588.jpg',2,'5@qq.com',1,'2023-03-31 10:16:07');/*Table structure for table `zhuanjia` */DROP TABLE IF EXISTS `zhuanjia`;CREATE TABLE `zhuanjia` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`username` varchar(200) DEFAULT NULL COMMENT '账户',`password` varchar(200) DEFAULT NULL COMMENT '密码',`zhuanjia_name` varchar(200) DEFAULT NULL COMMENT '专家姓名 Search111 ',`zhuanjia_phone` varchar(200) DEFAULT NULL COMMENT '专家手机号',`zhuanjia_id_number` varchar(200) DEFAULT NULL COMMENT '专家身份证号',`zhuanjia_photo` varchar(200) DEFAULT NULL COMMENT '专家头像',`sex_types` int(11) DEFAULT NULL COMMENT '性别',`zhuanjia_email` varchar(200) DEFAULT NULL COMMENT '专家邮箱',`jinyong_types` int(11) DEFAULT NULL COMMENT '账户状态 Search111 ',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='专家';/*Data for the table `zhuanjia` */insertinto `zhuanjia`(`id`,`username`,`password`,`zhuanjia_name`,`zhuanjia_phone`,`zhuanjia_id_number`,`zhuanjia_photo`,`sex_types`,`zhuanjia_email`,`jinyong_types`,`create_time`) values (1,'a1','123456','专家姓名1','17703786901','410224199010102001','upload/zhuanjia1.jpg',1,'1@qq.com',1,'2023-03-30 17:17:59'),(2,'a2','123456','专家姓名2','17703786902','410224199010102002','upload/zhuanjia2.jpg',1,'2@qq.com',1,'2023-03-30 17:17:59'),(3,'a3','123456','专家姓名3','17703786903','410224199010102003','upload/zhuanjia3.jpg',1,'3@qq.com',1,'2023-03-30 17:17:59');/*!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 */;
5、关键代码
5.1 项目管理Controller模块
/** * 项目 * 后端接口 * @author学长编程 * @email * WeChatjsjbysj88*/@RestController@Controller@RequestMapping("/xiangmu")public class XiangmuController {private static final Logger logger = LoggerFactory.getLogger(XiangmuController.class);private static final String TABLE_NAME = "xiangmu";@Autowiredprivate XiangmuService xiangmuService;@Autowiredprivate TokenService tokenService;@Autowiredprivate CaozuorizhiService caozuorizhiService;//操作日志@Autowiredprivate DictionaryService dictionaryService;//字典@Autowiredprivate GonggaoService gonggaoService;//公告@Autowiredprivate LiuyanService liuyanService;//留言板@Autowiredprivate NewsService newsService;//资讯信息@Autowiredprivate YonghuService yonghuService;//用户@Autowiredprivate ZhuanjiaService zhuanjiaService;//专家@Autowiredprivate UsersService usersService;//管理员/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map params, HttpServletRequest request){logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永不会进入");else if("用户".equals(role))params.put("yonghuId",request.getSession().getAttribute("userId"));else if("专家".equals(role))params.put("zhuanjiaId",request.getSession().getAttribute("userId"));CommonUtil.checkMap(params);PageUtils page = xiangmuService.queryPage(params);//字典表数据转换List list =(List)page.getList();for(XiangmuView c:list){//修改对应字典表字段dictionaryService.dictionaryConvert(c, request);}caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"列表查询",list.toString());return R.ok().put("data", page);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);XiangmuEntity xiangmu = xiangmuService.selectById(id);if(xiangmu !=null){//entity转viewXiangmuView view = new XiangmuView();BeanUtils.copyProperties( xiangmu , view );//把实体数据重构到view中//级联表 用户//级联表YonghuEntity yonghu = yonghuService.selectById(xiangmu.getYonghuId());if(yonghu != null){BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "yonghuId", "zhuanjiaId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表view.setYonghuId(yonghu.getId());}//级联表 专家//级联表ZhuanjiaEntity zhuanjia = zhuanjiaService.selectById(xiangmu.getZhuanjiaId());if(zhuanjia != null){BeanUtils.copyProperties( zhuanjia , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "yonghuId", "zhuanjiaId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表view.setZhuanjiaId(zhuanjia.getId());}//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"单条数据查看",view.toString());return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody XiangmuEntity xiangmu, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,xiangmu:{}",this.getClass().getName(),xiangmu.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永远不会进入");else if("用户".equals(role))xiangmu.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));else if("专家".equals(role))xiangmu.setZhuanjiaId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));Wrapper queryWrapper = new EntityWrapper().eq("yonghu_id", xiangmu.getYonghuId()).eq("zhuanjia_id", xiangmu.getZhuanjiaId()).eq("xiangmu_name", xiangmu.getXiangmuName()).eq("xiangmu_address", xiangmu.getXiangmuAddress()).eq("xiangmu_types", xiangmu.getXiangmuTypes()).eq("xiangmu_dengji_types", xiangmu.getXiangmuDengjiTypes()).in("xiangmu_yesno_types", new Integer[]{1,2});logger.info("sql语句:"+queryWrapper.getSqlSegment());XiangmuEntity xiangmuEntity = xiangmuService.selectOne(queryWrapper);if(xiangmuEntity==null){xiangmu.setInsertTime(new Date());xiangmu.setXiangmuYesnoTypes(1);xiangmu.setCreateTime(new Date());xiangmuService.insert(xiangmu);caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"新增",xiangmu.toString());return R.ok();}else {if(xiangmuEntity.getXiangmuYesnoTypes()==1)return R.error(511,"有相同的待审核的数据");else if(xiangmuEntity.getXiangmuYesnoTypes()==2)return R.error(511,"有相同的审核通过的数据");elsereturn R.error(511,"表中有相同数据");}}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody XiangmuEntity xiangmu, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {logger.debug("update方法:,,Controller:{},,xiangmu:{}",this.getClass().getName(),xiangmu.toString());XiangmuEntity oldXiangmuEntity = xiangmuService.selectById(xiangmu.getId());//查询原先数据String role = String.valueOf(request.getSession().getAttribute("role"));//if(false)//return R.error(511,"永远不会进入");//else if("用户".equals(role))//xiangmu.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));//else if("专家".equals(role))//xiangmu.setZhuanjiaId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));if("".equals(xiangmu.getXiangmuPhoto()) || "null".equals(xiangmu.getXiangmuPhoto())){xiangmu.setXiangmuPhoto(null);}xiangmuService.updateById(xiangmu);//根据id更新List strings = caozuorizhiService.clazzDiff(xiangmu, oldXiangmuEntity, request,new String[]{"updateTime"});caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"修改",strings.toString());return R.ok();}/*** 审核*/@RequestMapping("/shenhe")public R shenhe(@RequestBody XiangmuEntity xiangmuEntity, HttpServletRequest request){logger.debug("shenhe方法:,,Controller:{},,xiangmuEntity:{}",this.getClass().getName(),xiangmuEntity.toString());XiangmuEntity oldXiangmu = xiangmuService.selectById(xiangmuEntity.getId());//查询原先数据String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永远不会进入");else if("用户".equals(role))xiangmuEntity.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));else if("专家".equals(role))xiangmuEntity.setZhuanjiaId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));if(xiangmuEntity.getXiangmuYesnoTypes() == 2){//通过}else if(xiangmuEntity.getXiangmuYesnoTypes() == 3){//拒绝}xiangmuEntity.setXiangmuShenheTime(new Date());//审核时间xiangmuService.updateById(xiangmuEntity);//审核 caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"审核数据","审核"+oldXiangmu+"数据,审核结果是"+(xiangmuEntity.getXiangmuYesnoTypes()==2" /> oldXiangmuList =xiangmuService.selectBatchIds(Arrays.asList(ids));//要删除的数据xiangmuService.deleteBatchIds(Arrays.asList(ids));caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"删除",oldXiangmuList.toString());return R.ok();}/** * 批量上传 */@RequestMapping("/batchInsert")public R save( String fileName, HttpServletRequest request){logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))try {List xiangmuList = new ArrayList();//上传的东西Map<String, List> seachFields= new HashMap();//要查询的字段Date date = new Date();int lastIndexOf = fileName.lastIndexOf(".");if(lastIndexOf == -1){return R.error(511,"该文件没有后缀");}else{String suffix = fileName.substring(lastIndexOf);if(!".xls".equals(suffix)){return R.error(511,"只支持后缀为xls的excel文件");}else{URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径File file = new File(resource.getFile());if(!file.exists()){return R.error(511,"找不到上传文件,请联系管理员");}else{List<List> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件dataList.remove(0);//删除第一行,因为第一行是提示for(List data:dataList){//循环XiangmuEntity xiangmuEntity = new XiangmuEntity();//xiangmuEntity.setYonghuId(Integer.valueOf(data.get(0))); //用户 要改的//xiangmuEntity.setZhuanjiaId(Integer.valueOf(data.get(0))); //专家 要改的//xiangmuEntity.setXiangmuUuidNumber(data.get(0));//项目编号 要改的//xiangmuEntity.setXiangmuName(data.get(0));//项目名称 要改的//xiangmuEntity.setXiangmuPhoto("");//详情和图片//xiangmuEntity.setXiangmuAddress(data.get(0));//项目地点 要改的//xiangmuEntity.setXiangmuKaishiTime(sdf.parse(data.get(0)));//项目开始时间 要改的//xiangmuEntity.setXiangmuJieshuTime(sdf.parse(data.get(0)));//项目结束时间 要改的//xiangmuEntity.setXiangmuTypes(Integer.valueOf(data.get(0))); //项目类型 要改的//xiangmuEntity.setXiangmuDengjiTypes(Integer.valueOf(data.get(0))); //项目等级 要改的//xiangmuEntity.setXiangmuContent("");//详情和图片//xiangmuEntity.setInsertTime(date);//时间//xiangmuEntity.setXiangmuYesnoTypes(Integer.valueOf(data.get(0))); //审核状态 要改的//xiangmuEntity.setXiangmuYesnoText(data.get(0));//审核意见 要改的//xiangmuEntity.setXiangmuShenheTime(sdf.parse(data.get(0)));//审核时间 要改的//xiangmuEntity.setCreateTime(date);//时间xiangmuList.add(xiangmuEntity);//把要查询是否重复的字段放入map中//项目编号if(seachFields.containsKey("xiangmuUuidNumber")){List xiangmuUuidNumber = seachFields.get("xiangmuUuidNumber");xiangmuUuidNumber.add(data.get(0));//要改的}else{List xiangmuUuidNumber = new ArrayList();xiangmuUuidNumber.add(data.get(0));//要改的seachFields.put("xiangmuUuidNumber",xiangmuUuidNumber);}}//查询是否重复 //项目编号List xiangmuEntities_xiangmuUuidNumber = xiangmuService.selectList(new EntityWrapper().in("xiangmu_uuid_number", seachFields.get("xiangmuUuidNumber")));if(xiangmuEntities_xiangmuUuidNumber.size() >0 ){ArrayList repeatFields = new ArrayList();for(XiangmuEntity s:xiangmuEntities_xiangmuUuidNumber){repeatFields.add(s.getXiangmuUuidNumber());}return R.error(511,"数据库的该表中的 [项目编号] 字段已经存在 存在数据为:"+repeatFields.toString());}xiangmuService.insertBatch(xiangmuList);caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"批量新增",xiangmuList.toString());return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,"批量插入数据异常,请联系管理员");}}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map params, HttpServletRequest request){logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));CommonUtil.checkMap(params);PageUtils page = xiangmuService.queryPage(params);//字典表数据转换List list =(List)page.getList();for(XiangmuView c:list)dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"列表查询",list.toString());return R.ok().put("data", page);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);XiangmuEntity xiangmu = xiangmuService.selectById(id);if(xiangmu !=null){//entity转viewXiangmuView view = new XiangmuView();BeanUtils.copyProperties( xiangmu , view );//把实体数据重构到view中//级联表YonghuEntity yonghu = yonghuService.selectById(xiangmu.getYonghuId());if(yonghu != null){BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段view.setYonghuId(yonghu.getId());}//级联表ZhuanjiaEntity zhuanjia = zhuanjiaService.selectById(xiangmu.getZhuanjiaId());if(zhuanjia != null){BeanUtils.copyProperties( zhuanjia , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段view.setZhuanjiaId(zhuanjia.getId());}//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"单条数据查看",view.toString());return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody XiangmuEntity xiangmu, HttpServletRequest request){logger.debug("add方法:,,Controller:{},,xiangmu:{}",this.getClass().getName(),xiangmu.toString());Wrapper queryWrapper = new EntityWrapper().eq("yonghu_id", xiangmu.getYonghuId()).eq("zhuanjia_id", xiangmu.getZhuanjiaId()).eq("xiangmu_uuid_number", xiangmu.getXiangmuUuidNumber()).eq("xiangmu_name", xiangmu.getXiangmuName()).eq("xiangmu_address", xiangmu.getXiangmuAddress()).eq("xiangmu_types", xiangmu.getXiangmuTypes()).eq("xiangmu_dengji_types", xiangmu.getXiangmuDengjiTypes()).in("xiangmu_yesno_types", new Integer[]{1,2}).eq("xiangmu_yesno_text", xiangmu.getXiangmuYesnoText())//.notIn("xiangmu_types", new Integer[]{102});logger.info("sql语句:"+queryWrapper.getSqlSegment());XiangmuEntity xiangmuEntity = xiangmuService.selectOne(queryWrapper);if(xiangmuEntity==null){xiangmu.setInsertTime(new Date());xiangmu.setXiangmuYesnoTypes(1);xiangmu.setCreateTime(new Date());xiangmuService.insert(xiangmu);caozuorizhiService.insertCaozuorizhi(String.valueOf(request.getSession().getAttribute("role")),TABLE_NAME,String.valueOf(request.getSession().getAttribute("username")),"前台新增",xiangmu.toString());return R.ok();}else {if(xiangmuEntity.getXiangmuYesnoTypes()==1)return R.error(511,"有相同的待审核的数据");else if(xiangmuEntity.getXiangmuYesnoTypes()==2)return R.error(511,"有相同的审核通过的数据");elsereturn R.error(511,"表中有相同数据");}}}
5.2 项目管理Service模块
package com.service;import com.baomidou.mybatisplus.service.IService;import com.utils.PageUtils;import com.entity.XiangmuEntity;import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.lang.Nullable;import java.util.List;/** * 项目 服务类 */public interface XiangmuService extends IService {/*** @param params 查询参数* @return 带分页的查询出来的数据*/ PageUtils queryPage(Map params);}
5.3 项目管理ServiceImpl模块
package com.service.impl;import com.utils.StringUtil;import com.service.DictionaryService;import com.utils.ClazzDiff;import org.springframework.beans.BeanUtils;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;import java.lang.reflect.Field;import java.util.*;import com.baomidou.mybatisplus.plugins.Page;import com.baomidou.mybatisplus.service.impl.ServiceImpl;import org.springframework.transaction.annotation.Transactional;import com.utils.PageUtils;import com.utils.Query;import org.springframework.web.context.ContextLoader;import javax.servlet.ServletContext;import javax.servlet.http.HttpServletRequest;import org.springframework.lang.Nullable;import org.springframework.util.Assert;import com.dao.XiangmuDao;import com.entity.XiangmuEntity;import com.service.XiangmuService;import com.entity.view.XiangmuView;/** * 项目 服务实现类 */@Service("xiangmuService")@Transactionalpublic class XiangmuServiceImpl extends ServiceImpl implements XiangmuService {@Overridepublic PageUtils queryPage(Map params) {Page page =new Query(params).getPage();page.setRecords(baseMapper.selectListView(page,params));return new PageUtils(page);}}
5.4 项目管理Dao模块
package com.dao;import com.entity.XiangmuEntity;import com.baomidou.mybatisplus.mapper.BaseMapper;import java.util.List;import java.util.Map;import com.baomidou.mybatisplus.plugins.pagination.Pagination;import org.apache.ibatis.annotations.Param;import com.entity.view.XiangmuView;/** * 项目 Dao 接口 * * @author学长编程 * WeChat jsjbysj88 */public interface XiangmuDao extends BaseMapper { List selectListView(Pagination page,@Param("params")Map params);}
6、论文目录结构
7、源码获取
感谢大家的阅读,如有不懂的问题可以评论区交流或私聊!
喜欢文章可以点赞、收藏、关注、评论啦
→获取源码请私信←