计算机毕业设计 基于SpringBoot的红色革命文物征集管理系统的设计与实现 Java实战项目 附源码+文档+视频讲解

博主介绍:✌从事软件开发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 项目介绍

传统办法管理信息首先需要花费的时间比较多,其次数据出错率比较高,而且对错误的数据进行更改也比较困难,最后,检索数据费事费力。因此,在计算机上安装红色革命文物征集管理系统软件来发挥其高效地信息处理的作用,可以规范信息管理流程,让管理工作可以系统化和程序化,同时,红色革命文物征集管理系统的有效运用可以帮助管理人员准确快速地处理信息。

红色革命文物征集管理系统在对开发工具的选择上也很慎重,为了便于开发实现,选择的开发工具为Eclipse,选择的数据库工具为Mysql。以此搭建开发环境实现红色革命文物征集管理系统的功能。其中管理员管理用户,新闻公告。

红色革命文物征集管理系统是一款运用软件开发技术设计实现的应用系统,在信息处理上可以达到快速的目的,不管是针对数据添加,数据维护和统计,以及数据查询等处理要求,红色革命文物征集管理系统都可以轻松应对。

1.2 开发技术

Java开发语言、SpringBoot、MyBatisPlus、MySQL数据库、Maven、IDEA开发工具、JDK1.8+、Vue、HTML、CSS、JS。

2、系统功能设计结构图

3、功能截图

用户信息:用户信息的查询管理,可以删除用户信息、修改用户信息、新增用户信息,还进行了对用户名称的模糊查询的条件。

 文物信息管理:查看已发布的文物信息数据,修改文物信息,文物信息作废,即可删除,还进行了对文物信息名称的模糊查询 文物信息信息的类型查询等等一些条件。

论坛信息管理:根据论坛信息进行条件查询,还可以对论坛信息进行新增、修改、查询操作等等。

公告信息管理: 根据公告信息进行新增、修改、查询操作等等。

4、数据库表结构设计

CREATE DATABASE /*!32312 IF NOT EXISTS*/`hongshegemingwenwu` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `hongshegemingwenwu`;

/*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` */

insert  into `config`(`id`,`name`,`value`) values (1,'轮播图1','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=17 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,'wenwu_types','文物类型',1,'文物类型1',NULL,NULL,'2023-04-07 09:28:32'),(2,'wenwu_types','文物类型',2,'文物类型2',NULL,NULL,'2023-04-07 09:28:32'),(3,'wenwu_types','文物类型',3,'文物类型3',NULL,NULL,'2023-04-07 09:28:32'),(4,'wenwu_yesno_types','信息审核',1,'待审核',NULL,NULL,'2023-04-07 09:28:32'),(5,'wenwu_yesno_types','信息审核',2,'同意',NULL,NULL,'2023-04-07 09:28:32'),(6,'wenwu_yesno_types','信息审核',3,'拒绝',NULL,NULL,'2023-04-07 09:28:32'),(7,'wenwu_collection_types','收藏表类型',1,'收藏',NULL,NULL,'2023-04-07 09:28:32'),(8,'wenwu_collection_types','收藏表类型',2,'赞',NULL,NULL,'2023-04-07 09:28:32'),(9,'wenwu_collection_types','收藏表类型',3,'踩',NULL,NULL,'2023-04-07 09:28:32'),(10,'news_types','公告类型',1,'公告类型1',NULL,NULL,'2023-04-07 09:28:32'),(11,'news_types','公告类型',2,'公告类型2',NULL,NULL,'2023-04-07 09:28:32'),(12,'news_types','公告类型',3,'公告类型3',NULL,NULL,'2023-04-07 09:28:32'),(13,'sex_types','性别类型',1,'男',NULL,NULL,'2023-04-07 09:28:32'),(14,'sex_types','性别类型',2,'女',NULL,NULL,'2023-04-07 09:28:32'),(15,'forum_state_types','帖子状态',1,'发帖',NULL,NULL,'2023-04-07 09:28:32'),(16,'forum_state_types','帖子状态',2,'回帖',NULL,NULL,'2023-04-07 09:28:32');

/*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 '用户',
  `gongzuo_id` int(11) DEFAULT NULL COMMENT '工作人员',
  `users_id` int(11) DEFAULT NULL COMMENT '管理员',
  `forum_content` longtext 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=19 DEFAULT CHARSET=utf8 COMMENT='论坛';

/*Data for the table `forum` */

insert  into `forum`(`id`,`forum_name`,`yonghu_id`,`gongzuo_id`,`users_id`,`forum_content`,`super_ids`,`forum_state_types`,`insert_time`,`update_time`,`create_time`) values (1,'帖子标题1',1,NULL,NULL,'发布内容1',487,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(2,'帖子标题2',3,NULL,NULL,'发布内容2',462,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(3,'帖子标题3',1,NULL,NULL,'发布内容3',49,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(4,'帖子标题4',2,NULL,NULL,'发布内容4',403,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(5,'帖子标题5',3,NULL,NULL,'发布内容5',427,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(6,'帖子标题6',1,NULL,NULL,'发布内容6',253,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(7,'帖子标题7',2,NULL,NULL,'发布内容7',306,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(8,'帖子标题8',1,NULL,NULL,'发布内容8',470,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(9,'帖子标题9',2,NULL,NULL,'发布内容9',406,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(10,'帖子标题10',3,NULL,NULL,'发布内容10',344,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(11,'帖子标题11',3,NULL,NULL,'发布内容11',400,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(13,'帖子标题13',2,NULL,NULL,'发布内容13',4,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(14,'帖子标题14',1,NULL,NULL,'发布内容14',16,1,'2023-04-07 09:28:45','2023-04-07 09:28:45','2023-04-07 09:28:45'),(15,NULL,1,NULL,NULL,'可以删除自己发布的贴子和评论',14,2,'2023-04-07 09:36:34',NULL,'2023-04-07 09:36:34'),(17,NULL,NULL,1,NULL,'2222222222222',14,2,'2023-04-07 09:40:49',NULL,'2023-04-07 09:40:49'),(18,NULL,NULL,NULL,1,'333333333333333333333333333',14,2,'2023-04-07 09:42:00',NULL,'2023-04-07 09:42:00');

/*Table structure for table `gongzuo` */

DROP TABLE IF EXISTS `gongzuo`;

CREATE TABLE `gongzuo` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(200) DEFAULT NULL COMMENT '账户',
  `password` varchar(200) DEFAULT NULL COMMENT '密码',
  `gongzuo_name` varchar(200) DEFAULT NULL COMMENT '工作人员名称 Search111 ',
  `gongzuo_phone` varchar(200) DEFAULT NULL COMMENT '工作人员手机号',
  `gongzuo_id_number` varchar(200) DEFAULT NULL COMMENT '工作人员身份证号',
  `gongzuo_photo` varchar(200) DEFAULT NULL COMMENT '工作人员头像',
  `sex_types` int(11) DEFAULT NULL COMMENT '性别 Search111',
  `gongzuo_email` varchar(200) DEFAULT NULL COMMENT '工作人员邮箱',
  `gongzuo_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `insert_time` timestamp NULL 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 `gongzuo` */

insert  into `gongzuo`(`id`,`username`,`password`,`gongzuo_name`,`gongzuo_phone`,`gongzuo_id_number`,`gongzuo_photo`,`sex_types`,`gongzuo_email`,`gongzuo_delete`,`insert_time`,`create_time`) values (1,'a1','123456','工作人员名称1','17703786901','410224199010102001','upload/gongzuo1.jpg',2,'1@qq.com',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(2,'a2','123456','工作人员名称2','17703786902','410224199010102002','upload/gongzuo2.jpg',1,'2@qq.com',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(3,'a3','123456','工作人员名称3','17703786903','410224199010102003','upload/gongzuo3.jpg',1,'3@qq.com',1,'2023-04-07 09:28:45','2023-04-07 09:28:45');

/*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` 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` */

insert  into `news`(`id`,`news_name`,`news_types`,`news_photo`,`insert_time`,`news_content`,`create_time`) values (1,'公告标题1',1,'upload/news1.jpg','2023-04-07 09:28:45','公告详情1','2023-04-07 09:28:45'),(2,'公告标题2',2,'upload/news2.jpg','2023-04-07 09:28:45','公告详情2','2023-04-07 09:28:45'),(3,'公告标题3',2,'upload/news3.jpg','2023-04-07 09:28:45','公告详情3','2023-04-07 09:28:45'),(4,'公告标题4',2,'upload/news4.jpg','2023-04-07 09:28:45','公告详情4','2023-04-07 09:28:45'),(5,'公告标题5',2,'upload/news5.jpg','2023-04-07 09:28:45','公告详情5','2023-04-07 09:28:45'),(6,'公告标题6',1,'upload/news6.jpg','2023-04-07 09:28:45','公告详情6','2023-04-07 09:28:45'),(7,'公告标题7',3,'upload/news7.jpg','2023-04-07 09:28:45','公告详情7','2023-04-07 09:28:45'),(8,'公告标题8',1,'upload/news8.jpg','2023-04-07 09:28:45','公告详情8','2023-04-07 09:28:45'),(9,'公告标题9',3,'upload/news9.jpg','2023-04-07 09:28:45','公告详情9','2023-04-07 09:28:45'),(10,'公告标题10',1,'upload/news10.jpg','2023-04-07 09:28:45','公告详情10','2023-04-07 09:28:45'),(11,'公告标题11',3,'upload/news11.jpg','2023-04-07 09:28:45','公告详情11','2023-04-07 09:28:45'),(12,'公告标题12',2,'upload/news12.jpg','2023-04-07 09:28:45','公告详情12','2023-04-07 09:28:45'),(13,'公告标题13',3,'upload/news13.jpg','2023-04-07 09:28:45','公告详情13','2023-04-07 09:28:45'),(14,'公告标题14',1,'upload/news14.jpg','2023-04-07 09:28:45','公告详情14','2023-04-07 09:28:45');

/*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=4 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','用户','8rjci29p7yu0gx86tbcv0jk2v84vkxnh','2023-04-07 09:33:49','2023-04-07 10:35:38'),(2,1,'a1','gongzuo','工作人员','khgb9ao6wn18pdarjzs53zny7qju8fjt','2023-04-07 09:38:09','2023-04-07 10:38:09'),(3,1,'admin','users','管理员','9yzjrlaw3b8k3ttjm2rroeykz4ode5qp','2023-04-07 09:40:57','2023-04-07 10:43:46');

/*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-04-07 09:28:32');

/*Table structure for table `wenwu` */

DROP TABLE IF EXISTS `wenwu`;

CREATE TABLE `wenwu` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `wenwu_uuid_number` varchar(200) DEFAULT NULL COMMENT '文物编号',
  `wenwu_name` varchar(200) DEFAULT NULL COMMENT '文物牌号  Search111 ',
  `wenwu_photo` varchar(200) DEFAULT NULL COMMENT '文物图片',
  `wenwu_types` int(11) DEFAULT NULL COMMENT '文物类型 Search111',
  `wenwu_clicknum` int(11) DEFAULT NULL COMMENT '文物热度',
  `zan_number` int(11) DEFAULT NULL COMMENT '赞',
  `cai_number` int(11) DEFAULT NULL COMMENT '踩',
  `wenwu_content` longtext COMMENT '文物介绍 ',
  `wenwu_yesno_types` int(11) DEFAULT NULL COMMENT '信息审核 Search111',
  `wenwu_yesno_text` longtext COMMENT '审核结果 ',
  `wenwu_delete` int(11) DEFAULT NULL 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 `wenwu` */

insert  into `wenwu`(`id`,`yonghu_id`,`wenwu_uuid_number`,`wenwu_name`,`wenwu_photo`,`wenwu_types`,`wenwu_clicknum`,`zan_number`,`cai_number`,`wenwu_content`,`wenwu_yesno_types`,`wenwu_yesno_text`,`wenwu_delete`,`insert_time`,`create_time`) values (1,3,'1680830925119','文物牌号1','upload/wenwu1.jpg',2,4,284,389,'文物介绍1',1,NULL,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(2,1,'1680830925164','文物牌号2','upload/wenwu2.jpg',2,37,151,405,'文物介绍2',1,NULL,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(3,3,'1680830925137','文物牌号3','upload/wenwu3.jpg',1,118,460,186,'文物介绍3',1,NULL,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(4,2,'1680830925164','文物牌号4','upload/wenwu4.jpg',2,428,143,78,'文物介绍4',1,NULL,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(5,2,'1680830925180','文物牌号5','upload/wenwu5.jpg',2,135,99,348,'文物介绍5',2,'通过',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(6,3,'1680830925167','文物牌号6','upload/wenwu6.jpg',1,40,257,430,'文物介绍6',2,'通过',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(7,1,'1680830925186','文物牌号7','upload/wenwu7.jpg',1,151,145,151,'文物介绍7',2,'通过',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(8,2,'1680830925193','文物牌号8','upload/wenwu1.jpg',3,325,62,270,'文物介绍8',2,'通过',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(9,1,'1680830925131','文物牌号9','upload/wenwu2.jpg',1,453,368,493,'文物介绍9',2,'通过',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(10,1,'1680830925121','文物牌号10','upload/wenwu3.jpg',1,258,71,125,'文物介绍10',2,'通过',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(11,1,'1680830925151','文物牌号11','upload/wenwu4.jpg',2,149,89,385,'文物介绍11',2,'通过',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(12,2,'1680830925152','文物牌号12','upload/wenwu5.jpg',1,124,482,349,'文物介绍12',2,'审核通过的数据会在前台展示粗来',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(13,2,'1680830925186','文物牌号13','upload/wenwu6.jpg',2,200,473,10,'文物介绍13',3,'123',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(14,1,'1680830925138','文物牌号14','upload/wenwu7.jpg',2,433,287,320,'文物介绍14',2,'111112',1,'2023-04-07 09:28:45','2023-04-07 09:28:45');

/*Table structure for table `wenwu_collection` */

DROP TABLE IF EXISTS `wenwu_collection`;

CREATE TABLE `wenwu_collection` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `wenwu_id` int(11) DEFAULT NULL COMMENT '文物',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `wenwu_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=19 DEFAULT CHARSET=utf8 COMMENT='文物收藏';

/*Data for the table `wenwu_collection` */

insert  into `wenwu_collection`(`id`,`wenwu_id`,`yonghu_id`,`wenwu_collection_types`,`insert_time`,`create_time`) values (1,1,2,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(2,2,1,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(4,4,1,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(5,5,1,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(6,6,2,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(7,7,1,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(12,12,3,1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(15,5,1,2,'2023-04-07 09:35:41','2023-04-07 09:35:41'),(16,9,1,2,'2023-04-07 09:36:15','2023-04-07 09:36:15'),(17,6,1,1,'2023-04-07 09:36:18','2023-04-07 09:36:18'),(18,6,1,3,'2023-04-07 09:36:20','2023-04-07 09:36:20');

/*Table structure for table `wenwu_liuyan` */

DROP TABLE IF EXISTS `wenwu_liuyan`;

CREATE TABLE `wenwu_liuyan` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `wenwu_id` int(11) DEFAULT NULL COMMENT '文物',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `wenwu_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 '创建时间 show3 listShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='文物留言';

/*Data for the table `wenwu_liuyan` */

insert  into `wenwu_liuyan`(`id`,`wenwu_id`,`yonghu_id`,`wenwu_liuyan_text`,`insert_time`,`reply_text`,`update_time`,`create_time`) values (1,1,3,'留言内容1','2023-04-07 09:28:45','回复信息1','2023-04-07 09:28:45','2023-04-07 09:28:45'),(2,2,1,'留言内容2','2023-04-07 09:28:45','回复信息2','2023-04-07 09:28:45','2023-04-07 09:28:45'),(3,3,1,'留言内容3','2023-04-07 09:28:45','回复信息3','2023-04-07 09:28:45','2023-04-07 09:28:45'),(4,4,2,'留言内容4','2023-04-07 09:28:45','回复信息4','2023-04-07 09:28:45','2023-04-07 09:28:45'),(5,5,3,'留言内容5','2023-04-07 09:28:45','回复信息5','2023-04-07 09:28:45','2023-04-07 09:28:45'),(6,6,3,'留言内容6','2023-04-07 09:28:45','回复信息6','2023-04-07 09:28:45','2023-04-07 09:28:45'),(7,7,1,'留言内容7','2023-04-07 09:28:45','回复信息7','2023-04-07 09:28:45','2023-04-07 09:28:45'),(8,8,1,'留言内容8','2023-04-07 09:28:45','回复信息8','2023-04-07 09:28:45','2023-04-07 09:28:45'),(9,9,1,'留言内容9','2023-04-07 09:28:45','回复信息9','2023-04-07 09:28:45','2023-04-07 09:28:45'),(10,10,3,'留言内容10','2023-04-07 09:28:45','回复信息10','2023-04-07 09:28:45','2023-04-07 09:28:45'),(11,11,3,'留言内容11','2023-04-07 09:28:45','回复信息11','2023-04-07 09:28:45','2023-04-07 09:28:45'),(12,12,2,'留言内容12','2023-04-07 09:28:45','回复信息12','2023-04-07 09:28:45','2023-04-07 09:28:45'),(13,13,3,'留言内容13','2023-04-07 09:28:45','回复信息13','2023-04-07 09:28:45','2023-04-07 09:28:45'),(15,5,1,'登录后才能进入数据详情页 进行点赞留言收藏等操作','2023-04-07 09:36:08',NULL,NULL,'2023-04-07 09:36:08');

/*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 '性别 Search111',
  `yonghu_email` varchar(200) DEFAULT NULL COMMENT '用户邮箱',
  `yonghu_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `insert_time` timestamp NULL 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 `yonghu` */

insert  into `yonghu`(`id`,`username`,`password`,`yonghu_name`,`yonghu_phone`,`yonghu_id_number`,`yonghu_photo`,`sex_types`,`yonghu_email`,`yonghu_delete`,`insert_time`,`create_time`) values (1,'a1','123456','用户名称1','17703786901','410224199010102001','upload/yonghu1.jpg',2,'1@qq.com',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(2,'a2','123456','用户名称2','17703786902','410224199010102002','upload/yonghu2.jpg',2,'2@qq.com',1,'2023-04-07 09:28:45','2023-04-07 09:28:45'),(3,'a3','123456','用户名称3','17703786903','410224199010102003','upload/yonghu3.jpg',2,'3@qq.com',1,'2023-04-07 09:28:45','2023-04-07 09:28:45');

/*!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
 * WeChat  jsjbysj88
*/
@RestController
@Controller
@RequestMapping("/wenwu")
public class WenwuController {
    private static final Logger logger = LoggerFactory.getLogger(WenwuController.class);

    private static final String TABLE_NAME = "wenwu";

    @Autowired
    private WenwuService wenwuService;

    @Autowired
    private TokenService tokenService;

    @Autowired
    private DictionaryService dictionaryService;//字典
    @Autowired
    private ForumService forumService;//论坛
    @Autowired
    private GongzuoService gongzuoService;//工作人员
    @Autowired
    private NewsService newsService;//公告资讯
    @Autowired
    private WenwuCollectionService wenwuCollectionService;//文物收藏
    @Autowired
    private WenwuLiuyanService wenwuLiuyanService;//文物留言
    @Autowired
    private YonghuService yonghuService;//用户
    @Autowired
    private UsersService usersService;//管理员


    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> 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("gongzuoId",request.getSession().getAttribute("userId"));
        params.put("wenwuDeleteStart",1);params.put("wenwuDeleteEnd",1);
        CommonUtil.checkMap(params);
        PageUtils page = wenwuService.queryPage(params);

        //字典表数据转换
        List<WenwuView> list =(List<WenwuView>)page.getList();
        for(WenwuView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c, request);
        }
        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);
        WenwuEntity wenwu = wenwuService.selectById(id);
        if(wenwu !=null){
            //entity转view
            WenwuView view = new WenwuView();
            BeanUtils.copyProperties( wenwu , view );//把实体数据重构到view中
            //级联表 用户
            //级联表
            YonghuEntity yonghu = yonghuService.selectById(wenwu.getYonghuId());
            if(yonghu != null){
            BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
            view.setYonghuId(yonghu.getId());
            }
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view, request);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody WenwuEntity wenwu, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,wenwu:{}",this.getClass().getName(),wenwu.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永远不会进入");
        else if("用户".equals(role))
            wenwu.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));

        Wrapper<WenwuEntity> queryWrapper = new EntityWrapper<WenwuEntity>()
            .eq("yonghu_id", wenwu.getYonghuId())
            .eq("wenwu_name", wenwu.getWenwuName())
            .eq("wenwu_types", wenwu.getWenwuTypes())
            .eq("zan_number", wenwu.getZanNumber())
            .eq("cai_number", wenwu.getCaiNumber())
            .in("wenwu_yesno_types", new Integer[]{1,2})
            .eq("wenwu_delete", 1)
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        WenwuEntity wenwuEntity = wenwuService.selectOne(queryWrapper);
        if(wenwuEntity==null){
            wenwu.setWenwuClicknum(1);
            wenwu.setWenwuYesnoTypes(1);
            wenwu.setWenwuDelete(1);
            wenwu.setInsertTime(new Date());
            wenwu.setCreateTime(new Date());
            wenwuService.insert(wenwu);
            return R.ok();
        }else {
            if(wenwuEntity.getWenwuYesnoTypes()==1)
                return R.error(511,"有相同的待审核的数据");
            else if(wenwuEntity.getWenwuYesnoTypes()==2)
                return R.error(511,"有相同的审核通过的数据");
            else
                return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody WenwuEntity wenwu, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
        logger.debug("update方法:,,Controller:{},,wenwu:{}",this.getClass().getName(),wenwu.toString());
        WenwuEntity oldWenwuEntity = wenwuService.selectById(wenwu.getId());//查询原先数据

        String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
//        else if("用户".equals(role))
//            wenwu.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
        if("".equals(wenwu.getWenwuPhoto()) || "null".equals(wenwu.getWenwuPhoto())){
                wenwu.setWenwuPhoto(null);
        }

            wenwuService.updateById(wenwu);//根据id更新
            return R.ok();
    }


    /**
    * 审核
    */
    @RequestMapping("/shenhe")
    public R shenhe(@RequestBody WenwuEntity wenwuEntity, HttpServletRequest request){
        logger.debug("shenhe方法:,,Controller:{},,wenwuEntity:{}",this.getClass().getName(),wenwuEntity.toString());

        WenwuEntity oldWenwu = wenwuService.selectById(wenwuEntity.getId());//查询原先数据

//        if(wenwuEntity.getWenwuYesnoTypes() == 2){//通过
//            wenwuEntity.setWenwuTypes();
//        }else if(wenwuEntity.getWenwuYesnoTypes() == 3){//拒绝
//            wenwuEntity.setWenwuTypes();
//        }
        wenwuService.updateById(wenwuEntity);//审核

        return R.ok();
    }

    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        List<WenwuEntity> oldWenwuList =wenwuService.selectBatchIds(Arrays.asList(ids));//要删除的数据
        ArrayList<WenwuEntity> list = new ArrayList<>();
        for(Integer id:ids){
            WenwuEntity wenwuEntity = new WenwuEntity();
            wenwuEntity.setId(id);
            wenwuEntity.setWenwuDelete(2);
            list.add(wenwuEntity);
        }
        if(list != null && list.size() >0){
            wenwuService.updateBatchById(list);
        }

        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<WenwuEntity> wenwuList = new ArrayList<>();//上传的东西
            Map<String, List<String>> 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<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
                        dataList.remove(0);//删除第一行,因为第一行是提示
                        for(List<String> data:dataList){
                            //循环
                            WenwuEntity wenwuEntity = new WenwuEntity();
//                            wenwuEntity.setYonghuId(Integer.valueOf(data.get(0)));   //用户 要改的
//                            wenwuEntity.setWenwuUuidNumber(data.get(0));                    //文物编号 要改的
//                            wenwuEntity.setWenwuName(data.get(0));                    //文物名称 要改的
//                            wenwuEntity.setWenwuPhoto("");//详情和图片
//                            wenwuEntity.setWenwuTypes(Integer.valueOf(data.get(0)));   //文物类型 要改的
//                            wenwuEntity.setWenwuClicknum(Integer.valueOf(data.get(0)));   //文物热度 要改的
//                            wenwuEntity.setZanNumber(Integer.valueOf(data.get(0)));   //赞 要改的
//                            wenwuEntity.setCaiNumber(Integer.valueOf(data.get(0)));   //踩 要改的
//                            wenwuEntity.setWenwuContent("");//详情和图片
//                            wenwuEntity.setWenwuYesnoTypes(Integer.valueOf(data.get(0)));   //信息审核 要改的
//                            wenwuEntity.setWenwuYesnoText(data.get(0));                    //审核结果 要改的
//                            wenwuEntity.setWenwuDelete(1);//逻辑删除字段
//                            wenwuEntity.setInsertTime(date);//时间
//                            wenwuEntity.setCreateTime(date);//时间
                            wenwuList.add(wenwuEntity);


                            //把要查询是否重复的字段放入map中
                                //文物编号
                                if(seachFields.containsKey("wenwuUuidNumber")){
                                    List<String> wenwuUuidNumber = seachFields.get("wenwuUuidNumber");
                                    wenwuUuidNumber.add(data.get(0));//要改的
                                }else{
                                    List<String> wenwuUuidNumber = new ArrayList<>();
                                    wenwuUuidNumber.add(data.get(0));//要改的
                                    seachFields.put("wenwuUuidNumber",wenwuUuidNumber);
                                }
                        }

                        //查询是否重复
                         //文物编号
                        List<WenwuEntity> wenwuEntities_wenwuUuidNumber = wenwuService.selectList(new EntityWrapper<WenwuEntity>().in("wenwu_uuid_number", seachFields.get("wenwuUuidNumber")).eq("wenwu_delete", 1));
                        if(wenwuEntities_wenwuUuidNumber.size() >0 ){
                            ArrayList<String> repeatFields = new ArrayList<>();
                            for(WenwuEntity s:wenwuEntities_wenwuUuidNumber){
                                repeatFields.add(s.getWenwuUuidNumber());
                            }
                            return R.error(511,"数据库的该表中的 [文物编号] 字段已经存在 存在数据为:"+repeatFields.toString());
                        }
                        wenwuService.insertBatch(wenwuList);
                        return R.ok();
                    }
                }
            }
        }catch (Exception e){
            e.printStackTrace();
            return R.error(511,"批量插入数据异常,请联系管理员");
        }
    }


    /**
    * 个性推荐
    */
    @IgnoreAuth
    @RequestMapping("/gexingtuijian")
    public R gexingtuijian(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("gexingtuijian方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        CommonUtil.checkMap(params);
        List<WenwuView> returnWenwuViewList = new ArrayList<>();

        //查看收藏
        Map<String, Object> params1 = new HashMap<>(params);params1.put("sort","id");params1.put("yonghuId",request.getSession().getAttribute("userId"));
        PageUtils pageUtils = wenwuCollectionService.queryPage(params1);
        List<WenwuCollectionView> collectionViewsList =(List<WenwuCollectionView>)pageUtils.getList();
        Map<Integer,Integer> typeMap=new HashMap<>();//购买的类型list
        for(WenwuCollectionView collectionView:collectionViewsList){
            Integer wenwuTypes = collectionView.getWenwuTypes();
            if(typeMap.containsKey(wenwuTypes)){
                typeMap.put(wenwuTypes,typeMap.get(wenwuTypes)+1);
            }else{
                typeMap.put(wenwuTypes,1);
            }
        }
        List<Integer> typeList = new ArrayList<>();//排序后的有序的类型 按最多到最少
        typeMap.entrySet().stream().sorted((o1, o2) -> o2.getValue() - o1.getValue()).forEach(e -> typeList.add(e.getKey()));//排序
        Integer limit = Integer.valueOf(String.valueOf(params.get("limit")));
        for(Integer type:typeList){
            Map<String, Object> params2 = new HashMap<>(params);params2.put("wenwuTypes",type);
            PageUtils pageUtils1 = wenwuService.queryPage(params2);
            List<WenwuView> wenwuViewList =(List<WenwuView>)pageUtils1.getList();
            returnWenwuViewList.addAll(wenwuViewList);
            if(returnWenwuViewList.size()>= limit) break;//返回的推荐数量大于要的数量 跳出循环
        }
        //正常查询出来商品,用于补全推荐缺少的数据
        PageUtils page = wenwuService.queryPage(params);
        if(returnWenwuViewList.size()<limit){//返回数量还是小于要求数量
            int toAddNum = limit - returnWenwuViewList.size();//要添加的数量
            List<WenwuView> wenwuViewList =(List<WenwuView>)page.getList();
            for(WenwuView wenwuView:wenwuViewList){
                Boolean addFlag = true;
                for(WenwuView returnWenwuView:returnWenwuViewList){
                    if(returnWenwuView.getId().intValue() ==wenwuView.getId().intValue()) addFlag=false;//返回的数据中已存在此商品
                }
                if(addFlag){
                    toAddNum=toAddNum-1;
                    returnWenwuViewList.add(wenwuView);
                    if(toAddNum==0) break;//够数量了
                }
            }
        }else {
            returnWenwuViewList = returnWenwuViewList.subList(0, limit);
        }

        for(WenwuView c:returnWenwuViewList)
            dictionaryService.dictionaryConvert(c, request);
        page.setList(returnWenwuViewList);
        return R.ok().put("data", page);
    }

    /**
    * 前端列表
    */
    @IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));

        CommonUtil.checkMap(params);
        PageUtils page = wenwuService.queryPage(params);

        //字典表数据转换
        List<WenwuView> list =(List<WenwuView>)page.getList();
        for(WenwuView c:list)
            dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段

        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);
        WenwuEntity wenwu = wenwuService.selectById(id);
            if(wenwu !=null){

                //点击数量加1
                wenwu.setWenwuClicknum(wenwu.getWenwuClicknum()+1);
                wenwuService.updateById(wenwu);

                //entity转view
                WenwuView view = new WenwuView();
                BeanUtils.copyProperties( wenwu , view );//把实体数据重构到view中

                //级联表
                    YonghuEntity yonghu = yonghuService.selectById(wenwu.getYonghuId());
                if(yonghu != null){
                    BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setYonghuId(yonghu.getId());
                }
                //修改对应字典表字段
                dictionaryService.dictionaryConvert(view, request);
                return R.ok().put("data", view);
            }else {
                return R.error(511,"查不到数据");
            }
    }


    /**
    * 前端保存
    */
    @RequestMapping("/add")
    public R add(@RequestBody WenwuEntity wenwu, HttpServletRequest request){
        logger.debug("add方法:,,Controller:{},,wenwu:{}",this.getClass().getName(),wenwu.toString());
        Wrapper<WenwuEntity> queryWrapper = new EntityWrapper<WenwuEntity>()
            .eq("yonghu_id", wenwu.getYonghuId())
            .eq("wenwu_uuid_number", wenwu.getWenwuUuidNumber())
            .eq("wenwu_name", wenwu.getWenwuName())
            .eq("wenwu_types", wenwu.getWenwuTypes())
            .eq("wenwu_clicknum", wenwu.getWenwuClicknum())
            .eq("zan_number", wenwu.getZanNumber())
            .eq("cai_number", wenwu.getCaiNumber())
            .in("wenwu_yesno_types", new Integer[]{1,2})
            .eq("wenwu_yesno_text", wenwu.getWenwuYesnoText())
            .eq("wenwu_delete", wenwu.getWenwuDelete())
//            .notIn("wenwu_types", new Integer[]{102})
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        WenwuEntity wenwuEntity = wenwuService.selectOne(queryWrapper);
        if(wenwuEntity==null){
            wenwu.setWenwuClicknum(1);
                wenwu.setZanNumber(1);
                wenwu.setCaiNumber(1);
            wenwu.setWenwuYesnoTypes(1);
            wenwu.setWenwuDelete(1);
            wenwu.setInsertTime(new Date());
            wenwu.setCreateTime(new Date());
        wenwuService.insert(wenwu);

            return R.ok();
        }else {
            if(wenwuEntity.getWenwuYesnoTypes()==1)
                return R.error(511,"有相同的待审核的数据");
            else if(wenwuEntity.getWenwuYesnoTypes()==2)
                return R.error(511,"有相同的审核通过的数据");
            else
                return R.error(511,"表中有相同数据");
        }
    }

}

5.2 文物Service模块 

package com.service;

import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.WenwuEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable;
import java.util.List;

/**
 * 文物 服务类
 */
public interface WenwuService extends IService<WenwuEntity> {

    /**
    * @param params 查询参数
    * @return 带分页的查询出来的数据
    */
     PageUtils queryPage(Map<String, Object> 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.WenwuDao;
import com.entity.WenwuEntity;
import com.service.WenwuService;
import com.entity.view.WenwuView;

/**
 * 文物 服务实现类
 */
@Service("wenwuService")
@Transactional
public class WenwuServiceImpl extends ServiceImpl<WenwuDao, WenwuEntity> implements WenwuService {

    @Override
    public PageUtils queryPage(Map<String,Object> params) {
        Page<WenwuView> page =new Query<WenwuView>(params).getPage();
        page.setRecords(baseMapper.selectListView(page,params));
        return new PageUtils(page);
    }

}

5.4 文物Dao模块

package com.dao;

import com.entity.WenwuEntity;
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.WenwuView;

/**
 * 文物 Dao 接口
 *
 * @author 
 */
public interface WenwuDao extends BaseMapper<WenwuEntity> {

   List<WenwuView> selectListView(Pagination page,@Param("params")Map<String,Object> params);

}

6、论文目录结构

7、源码获取

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

喜欢文章可以点赞、收藏、关注、评论

获取源码请私信

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/332769.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

CSS 实现卡片以及鼠标移入特效

CSS 实现卡片以及鼠标移入特效 文章目录 CSS 实现卡片以及鼠标移入特效0、效果预览默认鼠标移入后 1、创建卡片组件2、添加样式3、完整代码 0、效果预览 默认 鼠标移入后 在本篇博客中&#xff0c;我们将探讨如何使用 CSS 来实现卡片组件&#xff0c;并添加鼠标移入特效&#…

第五回 九纹龙剪径赤松林 鲁智深火烧瓦罐寺 Webmin傻瓜式配置服务器

话说鲁智深走过数个山坡&#xff0c;看见一所败落的寺庙&#xff0c;上写“瓦罐之寺”。庙里空无一人&#xff0c;于是鲁智深径直走到后面厨房&#xff0c;发现有几个老和尚。鲁智深向和尚们讨要饭食&#xff0c;和尚们初时推说没有。然而&#xff0c;鲁智深眼尖&#xff0c;发…

【Python程序开发系列】一文搞懂argparse模块的常见用法(案例+源码)

一、引言 argsparse是python的命令行解析的标准模块&#xff0c;内置于python&#xff0c;不需要安装。这个库可以让我们直接在命令行中就可以向程序中传入参数并让程序运行。 在运行深度学习程序时。往往会因为电脑配置不行导致程序运行慢卡&#xff0c;需要将程序在虚机上进行…

【React基础】– JSX语法

文章目录 认识JSX为什么React选择了JSXJSX的使用 React事件绑定this的绑定问题事件参数传递 React条件渲染React列表渲染列表中的key JSX的本质createElement源码Babel官网查看直接编写jsx代码 虚拟DOM的创建过程jsx – 虚拟DOM – 真实DOM声明式编程 阶段案例练习 认识JSX ◼ …

手动添加测试用例配置输入参数和期望值

1.选中函数&#xff0c;点击右键选择插入测试用例。这里所选择的插入测试用例区别于之前的测试用例的地方在于&#xff0c;这里插入测试用例是手动配置的&#xff0c;之前的是自动生成的。手动配置可以自定义选择输入参数和期望值。 2.添加测试用例后&#xff0c;点击测试用例&…

高光谱分类论文解读分享之Grid Network: 基于各向异性视角下特征提取的高光谱影像分类

IEEE GRSL 2023&#xff1a;Grid Network: 基于各向异性视角下特征提取的高光谱影像分类 题目 Grid Network: Feature Extraction in Anisotropic Perspective for Hyperspectral Image Classification 作者 Zhonghao Chen , Student Member, IEEE, Danfeng Hong , Senior …

Conmi的正确答案——使用eclipse进行ESP32C3的debug

eclipse IDE 版本:2023-12 1、安装debug环境 参考大神的教程:【图文】手把手教你使用 Eclipse IDE 开发 ESP32 (这里是为了我下次回来速通才写的部分) 1.1、安装插件(plug-in,新的软件已经写成software了): 相关软件参数: 汉化(安装完成会提示重启应用): Name:…

【前后端的那些事】15min快速实现图片上传,预览功能(ElementPlus+Springboot)

文章目录 Element Plus SpringBoot实现图片上传&#xff0c;预览&#xff0c;删除效果展示 1. 后端代码1.1 controller1.2 service 2. 前端代码2.1 路由创建2.2 api接口2.2 文件创建 3. 前端上传组件封装 前言&#xff1a;最近写项目&#xff0c;发现了一些很有意思的功能&…

node.js 实现文件上传 和图片映射 文件下载(multer)

Muter是一个node.js中间件。主要处理multupart/from-data类型的表单数据&#xff0c;常用于上传文件。在express.js应用中&#xff0c;multer使得上传文件变得更加简单。主要功能是将客户端上传的文件存储在服务器的本地文件系统中。它还添加了一个body对象以及file或files对象…

qnx 上screen + egl + opengles 最简实例

文章目录 前言一、qnx 上的窗口系统——screen二、screen + egl + opengles 最简实例1.使用 addvariant 命令创建工程目录2. 添加源码文件3. common.mk 文件4. 编译与执行总结参考资料前言 本文主要介绍如何在QNX 系统上使用egl和opengles 控制GPU渲染一个三角形并显示到屏幕上…

数据结构与算法-二叉树-从前序与中序遍历序列构造二叉树

从前序与中序遍历序列构造二叉树 给定两个整数数组 preorder 和 inorder &#xff0c;其中 preorder 是二叉树的先序遍历&#xff0c; inorder 是同一棵树的中序遍历&#xff0c;请构造二叉树并返回其根节点。 示例 1: 输入: preorder [3,9,20,15,7], inorder [9,3,15,20,7…

Ubuntu18.04在线镜像仓库配置

在线镜像仓库 1、查操作系统版本 rootubuntu:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic 2、原文件备份 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 3、查…

深入理解Linux文件系统

&#x1f3ac;慕斯主页&#xff1a;修仙—别有洞天 ♈️今日夜电波&#xff1a;晴る—ヨルシカ 0:20━━━━━━️&#x1f49f;──────── 4:30 &#x1f504; ◀️ ⏸ ▶️ ☰ &…

宋仕强论道之华强北的领军企业(四十六)

华强北曾经的3发展是因为领军企业的带动而蓬勃发展&#xff0c;当年的华强集团、赛格集团、桑达集团和华发集团等是其中的代表&#xff0c;但现在他们失去了曾经的带头大哥的地位。其他的例子&#xff0c;如腾讯对于深圳市南山区科技园的带动&#xff0c;华为对龙岗坂田雪象岗头…

MySQL面试题 | 16.精选MySQL面试题

&#x1f90d; 前端开发工程师&#xff08;主业&#xff09;、技术博主&#xff08;副业&#xff09;、已过CET6 &#x1f368; 阿珊和她的猫_CSDN个人主页 &#x1f560; 牛客高级专题作者、在牛客打造高质量专栏《前端面试必备》 &#x1f35a; 蓝桥云课签约作者、已在蓝桥云…

Leetcode2207. 字符串中最多数目的子字符串

Every day a Leetcode 题目来源&#xff1a;2207. 字符串中最多数目的子字符串 解法1&#xff1a;贪心 一次遍历 设 pattern 的第一个字符为 x&#xff0c;第二个字符为 y。 根据题意&#xff0c;x 插入的位置越靠左&#xff0c;答案的个数越多&#xff1b;y 插入的位置越…

C#: form 窗体的各种操作

说明&#xff1a;记录 C# form 窗体的各种操作 1. C# form 窗体居中显示 // 获取屏幕的宽度和高度 int screenWidth Screen.PrimaryScreen.Bounds.Width; int screenHeight Screen.PrimaryScreen.Bounds.Height;// 设置窗体的位置 this.StartPosition FormStartPosition.M…

【Android】自定义View onDraw()方法会调用两次

问题 自定义了View后&#xff0c;在构造函数中设置画笔颜色&#xff0c;发现它没起效&#xff0c;但是在onDraw()里设置颜色就会起效&#xff0c;出问题的代码如下&#xff1a; public RoundSeekbarView(Context context, Nullable AttributeSet attrs) {super(context, attrs…

Discuz论坛网站登录账号操作慢,必须强制刷新才会显示登录怎么办?

飞飞发现在登录服务器大本营账号时&#xff0c;输入账号密码登录后还是显示的登录框&#xff0c;强制刷新后才知道已经登录了&#xff0c;每次都要刷新才能正常显示&#xff0c;非常影响用户体验&#xff0c;于是在网上找了类似的问题故障解决方法&#xff0c;目前问题已经解决…

vue安装组件报错In most cases you are behind a proxy or have bad network settings.

解决办法 步骤1 npm config get proxy npm config get https-proxy 如果2个返回值不为null&#xff0c;请执行下面代码&#xff0c;重置为null。否则&#xff0c;直接执行步骤2。 npm config set proxy null npm config set https-proxy null 步骤2 npm config set regis…