博主介绍:✌从事软件开发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*/`lvshishiwusuoanjianguanli` /*!40100 DEFAULT CHARACTER SET utf8 */;USE `lvshishiwusuoanjianguanli`;/*Table structure for table `anyuan` */DROP TABLE IF EXISTS `anyuan`;CREATE TABLE `anyuan` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',`anyuan_uuid_number` varchar(200) DEFAULT NULL COMMENT '案源编号',`anyuan_name` varchar(200) DEFAULT NULL COMMENT '案源名称 Search111 ',`anyuan_types` int(11) DEFAULT NULL COMMENT '案源类型 Search111',`yonghu_id` int(11) DEFAULT NULL COMMENT '客户',`anyuan_content` text COMMENT '案源介绍 ',`anyuan_yesno_types` int(11) DEFAULT NULL COMMENT '收案审批 Search111 ',`anyuan_yesno_text` text COMMENT '审批回复',`anyuan_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=16 DEFAULT CHARSET=utf8 COMMENT='案源信息';/*Data for the table `anyuan` */insert into `anyuan`(`id`,`anyuan_uuid_number`,`anyuan_name`,`anyuan_types`,`yonghu_id`,`anyuan_content`,`anyuan_yesno_types`,`anyuan_yesno_text`,`anyuan_delete`,`insert_time`,`create_time`) values (1,'1678955524464','案源名称1',2,2,'案源介绍1',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(2,'1678955524471','案源名称2',2,3,'案源介绍2',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(3,'1678955524396','案源名称3',1,1,'案源介绍3',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(4,'1678955524413','案源名称4',3,2,'案源介绍4',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(5,'1678955524434','案源名称5',1,1,'案源介绍5',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(6,'1678955524384','案源名称6',2,3,'案源介绍6',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(7,'1678955524402','案源名称7',3,1,'案源介绍7',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(8,'1678955524447','案源名称8',2,2,'案源介绍8',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(9,'1678955524411','案源名称9',2,2,'案源介绍9',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(10,'1678955524438','案源名称10',1,2,'案源介绍10',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(11,'1678955524381','案源名称11',1,1,'案源介绍11',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(12,'1678955524382','案源名称12',3,2,'案源介绍12',1,NULL,1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(13,'1678955524382','案源名称13',3,1,'案源介绍13',2,'123123',1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(14,'1678955524414','案源名称14',2,1,'案源介绍14',2,'123123',1,'2023-03-16 16:32:04','2023-03-16 16:32:04'),(15,'1679018890509','案源名称123123123123',3,1,'<p>案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>12312312312案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>1案源<span style=\"color: rgb(96, 98, 102);\">介绍</span>13123123123123</p>',2,'tongyi111111',1,'2023-03-17 10:08:30','2023-03-17 10:08:30');/*Table structure for table `anyuan_yuyue` */DROP TABLE IF EXISTS `anyuan_yuyue`;CREATE TABLE `anyuan_yuyue` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`anyuan_id` int(11) DEFAULT NULL COMMENT '案源',`lvshi_id` int(11) DEFAULT NULL COMMENT '律师',`anyuan_yuyue_text` text COMMENT '案源分析',`liucheng_text` text COMMENT '流程',`jilu_text` text COMMENT '交接记录',`jingfei_price` decimal(10,2) DEFAULT NULL COMMENT '办案经费',`anyuan_yuyue_file` varchar(200) DEFAULT NULL COMMENT '材料',`anyuan_yuyue_types` int(11) DEFAULT NULL COMMENT '案件类型 Search111',`anyuan_yuyue_yesno_types` int(11) DEFAULT NULL COMMENT '结案审批 Search111 ',`anyuan_yuyue_yesno_text` text COMMENT '审批回复',`anyuan_yuyue_shenhe_time` timestamp NULL DEFAULT NULL COMMENT '审核时间',`insert_time` timestamp NULL DEFAULT NULL COMMENT '收案时间',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show3 listShow',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='案件信息';/*Data for the table `anyuan_yuyue` *//*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,'anyuan_yesno_types','报名状态',1,'待审核',NULL,NULL,'2023-03-16 16:31:19'),(2,'anyuan_yesno_types','报名状态',2,'同意收案',NULL,NULL,'2023-03-16 16:31:19'),(3,'anyuan_yesno_types','报名状态',3,'拒绝收案',NULL,NULL,'2023-03-16 16:31:19'),(4,'anyuan_types','案源类型',1,'案源类型1',NULL,NULL,'2023-03-16 16:31:19'),(5,'anyuan_types','案源类型',2,'案源类型2',NULL,NULL,'2023-03-16 16:31:19'),(6,'anyuan_types','案源类型',3,'案源类型3',NULL,NULL,'2023-03-16 16:31:19'),(7,'anyuan_yuyue_types','案件类型',1,'诉讼案件',NULL,NULL,'2023-03-16 16:31:19'),(8,'anyuan_yuyue_types','案件类型',2,'非诉讼案件',NULL,NULL,'2023-03-16 16:31:19'),(9,'anyuan_yuyue_yesno_types','结案审批',1,'待审核',NULL,NULL,'2023-03-16 16:31:19'),(10,'anyuan_yuyue_yesno_types','结案审批',2,'已结案',NULL,NULL,'2023-03-16 16:31:19'),(11,'anyuan_yuyue_yesno_types','结案审批',3,'拒绝结案',NULL,NULL,'2023-03-16 16:31:19'),(12,'news_types','公告类型',1,'公告类型1',NULL,NULL,'2023-03-16 16:31:19'),(13,'news_types','公告类型',2,'公告类型2',NULL,NULL,'2023-03-16 16:31:19'),(14,'news_types','公告类型',3,'公告类型3',NULL,NULL,'2023-03-16 16:31:19'),(15,'sex_types','性别',1,'男',NULL,NULL,'2023-03-16 16:31:19'),(16,'sex_types','性别',2,'女',NULL,NULL,'2023-03-16 16:31:19');/*Table structure for table `jieanpingluen` */DROP TABLE IF EXISTS `jieanpingluen`;CREATE TABLE `jieanpingluen` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`anyuan_id` int(11) DEFAULT NULL COMMENT '案源',`jieanpingluen_text` text COMMENT '评论内容',`insert_time` timestamp NULL DEFAULT NULL COMMENT '评论时间',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show3 listShow',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='结案评论';/*Data for the table `jieanpingluen` */insert into `jieanpingluen`(`id`,`anyuan_id`,`jieanpingluen_text`,`insert_time`,`create_time`) values (15,14,'12312312','2023-03-17 09:49:47','2023-03-17 09:49:47'),(16,15,'123123123','2023-03-17 10:17:11','2023-03-17 10:17:11'),(17,13,'1231231','2023-03-17 10:17:23','2023-03-17 10:17:23');/*Table structure for table `kehuyijian` */DROP TABLE IF EXISTS `kehuyijian`;CREATE TABLE `kehuyijian` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`yonghu_id` int(11) DEFAULT NULL COMMENT '用户',`kehuyijian_text` text COMMENT '意见内容',`insert_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 `kehuyijian` */insert into `kehuyijian`(`id`,`yonghu_id`,`kehuyijian_text`,`insert_time`,`create_time`) values (1,3,'意见内容1','2023-03-16 16:32:04','2023-03-16 16:32:04'),(3,2,'意见内容3','2023-03-16 16:32:04','2023-03-16 16:32:04'),(6,2,'意见内容6','2023-03-16 16:32:04','2023-03-16 16:32:04'),(7,2,'意见内容7','2023-03-16 16:32:04','2023-03-16 16:32:04'),(9,3,'意见内容9','2023-03-16 16:32:04','2023-03-16 16:32:04'),(10,3,'意见内容10','2023-03-16 16:32:04','2023-03-16 16:32:04'),(12,2,'意见内容12','2023-03-16 16:32:04','2023-03-16 16:32:04'),(13,3,'意见内容13','2023-03-16 16:32:04','2023-03-16 16:32:04'),(14,2,'意见内容14','2023-03-16 16:32:04','2023-03-16 16:32:04'),(15,1,'服务很好,没意见','2023-03-17 10:12:11','2023-03-17 10:12:11');/*Table structure for table `lvshi` */DROP TABLE IF EXISTS `lvshi`;CREATE TABLE `lvshi` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`username` varchar(200) DEFAULT NULL COMMENT '账户',`password` varchar(200) DEFAULT NULL COMMENT '密码',`lvshi_name` varchar(200) DEFAULT NULL COMMENT '律师名称 Search111 ',`lvshi_photo` varchar(255) DEFAULT NULL COMMENT '头像',`lvshi_phone` varchar(200) DEFAULT NULL COMMENT '律师手机号',`lvshi_id_number` varchar(200) DEFAULT NULL COMMENT '律师身份证号 ',`sex_types` int(11) DEFAULT NULL COMMENT '性别 Search111 ',`lvshi_email` varchar(200) DEFAULT NULL COMMENT '邮箱',`lvshi_delete` int(11) DEFAULT '1' COMMENT '假删',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='律师';/*Data for the table `lvshi` */insert into `lvshi`(`id`,`username`,`password`,`lvshi_name`,`lvshi_photo`,`lvshi_phone`,`lvshi_id_number`,`sex_types`,`lvshi_email`,`lvshi_delete`,`create_time`) values (1,'a1','123456','律师名称1','upload/lvshi1.jpg','17703786901','410224199010102001',2,'1@qq.com',1,'2023-03-16 16:32:04'),(2,'a2','123456','律师名称2','upload/lvshi2.jpg','17703786902','410224199010102002',2,'2@qq.com',1,'2023-03-16 16:32:04'),(3,'a3','123456','律师名称3','upload/lvshi3.jpg','17703786903','410224199010102003',1,'3@qq.com',1,'2023-03-16 16:32:04');/*Table structure for table `lvshi_commentback` */DROP TABLE IF EXISTS `lvshi_commentback`;CREATE TABLE `lvshi_commentback` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`lvshi_id` int(11) DEFAULT NULL COMMENT '律师',`yonghu_id` int(11) DEFAULT NULL COMMENT '用户',`lvshi_commentback_text` text COMMENT '意见内容',`insert_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 `lvshi_commentback` */insert into `lvshi_commentback`(`id`,`lvshi_id`,`yonghu_id`,`lvshi_commentback_text`,`insert_time`,`create_time`) values (1,2,2,'意见内容1','2023-03-16 16:32:04','2023-03-16 16:32:04'),(2,1,3,'意见内容2','2023-03-16 16:32:04','2023-03-16 16:32:04'),(3,2,1,'意见内容3','2023-03-16 16:32:04','2023-03-16 16:32:04'),(4,3,2,'意见内容4','2023-03-16 16:32:04','2023-03-16 16:32:04'),(5,1,1,'意见内容5','2023-03-16 16:32:04','2023-03-16 16:32:04'),(6,1,3,'意见内容6','2023-03-16 16:32:04','2023-03-16 16:32:04'),(7,1,1,'意见内容7','2023-03-16 16:32:04','2023-03-16 16:32:04'),(8,2,3,'意见内容8','2023-03-16 16:32:04','2023-03-16 16:32:04'),(9,1,2,'意见内容9','2023-03-16 16:32:04','2023-03-16 16:32:04'),(10,1,2,'意见内容10','2023-03-16 16:32:04','2023-03-16 16:32:04'),(11,2,1,'意见内容11','2023-03-16 16:32:04','2023-03-16 16:32:04'),(12,1,3,'意见内容12','2023-03-16 16:32:04','2023-03-16 16:32:04'),(13,1,2,'意见内容13','2023-03-16 16:32:04','2023-03-16 16:32:04'),(14,1,2,'意见内容14','2023-03-16 16:32:04','2023-03-16 16:32:04'),(15,3,1,'2312312','2023-03-17 09:51:12','2023-03-17 09:51:12'),(16,3,1,'服务很不错','2023-03-17 10:09:24','2023-03-17 10:09:24');/*Table structure for table `news` */DROP TABLE IF EXISTS `news`;CREATE TABLE `news` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`news_name` varchar(200) DEFAULT NULL COMMENT '公告标题 Search111 ',`news_types` int(11) DEFAULT NULL COMMENT '公告类型 Search111 ',`news_photo` varchar(200) DEFAULT NULL COMMENT '公告图片',`insert_time` timestamp NULL DEFAULT NULL COMMENT '添加时间',`news_content` text COMMENT '公告详情',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show1 show2 nameShow',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=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',3,'upload/news1.jpg','2023-03-16 16:32:04','公告详情1','2023-03-16 16:32:04'),(2,'公告标题2',2,'upload/news2.jpg','2023-03-16 16:32:04','公告详情2','2023-03-16 16:32:04'),(3,'公告标题3',2,'upload/news3.jpg','2023-03-16 16:32:04','公告详情3','2023-03-16 16:32:04'),(4,'公告标题4',1,'upload/news4.jpg','2023-03-16 16:32:04','公告详情4','2023-03-16 16:32:04'),(5,'公告标题5',3,'upload/news5.jpg','2023-03-16 16:32:04','公告详情5','2023-03-16 16:32:04'),(6,'公告标题6',3,'upload/news6.jpg','2023-03-16 16:32:04','公告详情6','2023-03-16 16:32:04'),(7,'公告标题7',2,'upload/news7.jpg','2023-03-16 16:32:04','公告详情7','2023-03-16 16:32:04'),(8,'公告标题8',1,'upload/news8.jpg','2023-03-16 16:32:04','公告详情8','2023-03-16 16:32:04'),(9,'公告标题9',3,'upload/news9.jpg','2023-03-16 16:32:04','公告详情9','2023-03-16 16:32:04'),(10,'公告标题10',1,'upload/news10.jpg','2023-03-16 16:32:04','公告详情10','2023-03-16 16:32:04'),(11,'公告标题11',2,'upload/news11.jpg','2023-03-16 16:32:04','公告详情11','2023-03-16 16:32:04'),(12,'公告标题12',2,'upload/news12.jpg','2023-03-16 16:32:04','公告详情12','2023-03-16 16:32:04'),(13,'公告标题13',1,'upload/news13.jpg','2023-03-16 16:32:04','公告详情13','2023-03-16 16:32:04'),(14,'公告标题14',3,'upload/news14.jpg','2023-03-16 16:32:04','公告详情14','2023-03-16 16:32:04');/*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','客户','sr5xa5xo37od7eosn5stef2521k0sfh0','2023-03-17 09:34:15','2023-03-17 11:16:35'),(2,1,'a1','lvshi','律师','tjk76nf2ifwflg78xl9i6q1sq4esvne9','2023-03-17 09:40:49','2023-03-17 11:15:51'),(3,1,'admin','users','管理员','t1kskc1wl8nsh2h0c03yj2kgqp4jcjum','2023-03-17 09:47:30','2023-03-17 11:19:42');/*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-16 16:31:19');/*Table structure for table `yonghu` */DROP TABLE IF EXISTS `yonghu`;CREATE TABLE `yonghu` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`username` varchar(200) DEFAULT NULL COMMENT '账户',`password` varchar(200) DEFAULT NULL COMMENT '密码',`yonghu_name` varchar(200) DEFAULT NULL COMMENT '客户名称 Search111 ',`yonghu_photo` varchar(255) DEFAULT NULL COMMENT '头像',`yonghu_phone` varchar(200) DEFAULT NULL COMMENT '客户手机号',`yonghu_id_number` 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 '1' COMMENT '假删',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='客户';/*Data for the table `yonghu` */insert into `yonghu`(`id`,`username`,`password`,`yonghu_name`,`yonghu_photo`,`yonghu_phone`,`yonghu_id_number`,`sex_types`,`yonghu_email`,`yonghu_delete`,`create_time`) values (1,'a1','123456','客户名称1','upload/yonghu1.jpg','17703786901','410224199010102001',1,'1@qq.com',1,'2023-03-16 16:32:04'),(2,'a2','123456','客户名称2','upload/yonghu2.jpg','17703786902','410224199010102002',2,'2@qq.com',1,'2023-03-16 16:32:04'),(3,'a3','123456','客户名称3','upload/yonghu3.jpg','17703786903','410224199010102003',1,'3@qq.com',1,'2023-03-16 16:32:04');/*!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("/lvshi")
public class LvshiController {private static final Logger logger = LoggerFactory.getLogger(LvshiController.class);private static final String TABLE_NAME = "lvshi";@Autowiredprivate LvshiService lvshiService;@Autowiredprivate TokenService tokenService;@Autowiredprivate AnyuanService anyuanService;//案源信息@Autowiredprivate AnyuanYuyueService anyuanYuyueService;//案件信息@Autowiredprivate DictionaryService dictionaryService;//字典@Autowiredprivate JieanpingluenService jieanpingluenService;//结案评论@Autowiredprivate KehuyijianService kehuyijianService;//事务所意见@Autowiredprivate LvshiCommentbackService lvshiCommentbackService;//律师意见@Autowiredprivate NewsService newsService;//公告信息@Autowiredprivate YonghuService yonghuService;//客户@Autowiredprivate 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("lvshiId",request.getSession().getAttribute("userId"));params.put("lvshiDeleteStart",1);params.put("lvshiDeleteEnd",1);CommonUtil.checkMap(params);PageUtils page = lvshiService.queryPage(params);//字典表数据转换List<LvshiView> list =(List<LvshiView>)page.getList();for(LvshiView 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);LvshiEntity lvshi = lvshiService.selectById(id);if(lvshi !=null){//entity转viewLvshiView view = new LvshiView();BeanUtils.copyProperties( lvshi , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody LvshiEntity lvshi, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,lvshi:{}",this.getClass().getName(),lvshi.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永远不会进入");Wrapper<LvshiEntity> queryWrapper = new EntityWrapper<LvshiEntity>().eq("username", lvshi.getUsername()).or().eq("lvshi_phone", lvshi.getLvshiPhone()).or().eq("lvshi_id_number", lvshi.getLvshiIdNumber()).andNew().eq("lvshi_delete", 1);logger.info("sql语句:"+queryWrapper.getSqlSegment());LvshiEntity lvshiEntity = lvshiService.selectOne(queryWrapper);if(lvshiEntity==null){lvshi.setLvshiDelete(1);lvshi.setCreateTime(new Date());lvshi.setPassword("123456");lvshiService.insert(lvshi);return R.ok();}else {return R.error(511,"账户或者律师手机号或者律师身份证号已经被使用");}}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody LvshiEntity lvshi, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {logger.debug("update方法:,,Controller:{},,lvshi:{}",this.getClass().getName(),lvshi.toString());LvshiEntity oldLvshiEntity = lvshiService.selectById(lvshi.getId());//查询原先数据String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");if("".equals(lvshi.getLvshiPhoto()) || "null".equals(lvshi.getLvshiPhoto())){lvshi.setLvshiPhoto(null);}lvshiService.updateById(lvshi);//根据id更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Integer[] ids, HttpServletRequest request){logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());List<LvshiEntity> oldLvshiList =lvshiService.selectBatchIds(Arrays.asList(ids));//要删除的数据ArrayList<LvshiEntity> list = new ArrayList<>();for(Integer id:ids){LvshiEntity lvshiEntity = new LvshiEntity();lvshiEntity.setId(id);lvshiEntity.setLvshiDelete(2);list.add(lvshiEntity);}if(list != null && list.size() >0){lvshiService.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");try {List<LvshiEntity> lvshiList = 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){//循环LvshiEntity lvshiEntity = new LvshiEntity();
// lvshiEntity.setUsername(data.get(0)); //账户 要改的
// //lvshiEntity.setPassword("123456");//密码
// lvshiEntity.setLvshiName(data.get(0)); //律师名称 要改的
// lvshiEntity.setLvshiPhoto("");//详情和图片
// lvshiEntity.setLvshiPhone(data.get(0)); //律师手机号 要改的
// lvshiEntity.setLvshiIdNumber(data.get(0)); //律师身份证号 要改的
// lvshiEntity.setSexTypes(Integer.valueOf(data.get(0))); //性别 要改的
// lvshiEntity.setLvshiEmail(data.get(0)); //邮箱 要改的
// lvshiEntity.setLvshiDelete(1);//逻辑删除字段
// lvshiEntity.setCreateTime(date);//时间lvshiList.add(lvshiEntity);//把要查询是否重复的字段放入map中//账户if(seachFields.containsKey("username")){List<String> username = seachFields.get("username");username.add(data.get(0));//要改的}else{List<String> username = new ArrayList<>();username.add(data.get(0));//要改的seachFields.put("username",username);}//律师手机号if(seachFields.containsKey("lvshiPhone")){List<String> lvshiPhone = seachFields.get("lvshiPhone");lvshiPhone.add(data.get(0));//要改的}else{List<String> lvshiPhone = new ArrayList<>();lvshiPhone.add(data.get(0));//要改的seachFields.put("lvshiPhone",lvshiPhone);}//律师身份证号if(seachFields.containsKey("lvshiIdNumber")){List<String> lvshiIdNumber = seachFields.get("lvshiIdNumber");lvshiIdNumber.add(data.get(0));//要改的}else{List<String> lvshiIdNumber = new ArrayList<>();lvshiIdNumber.add(data.get(0));//要改的seachFields.put("lvshiIdNumber",lvshiIdNumber);}}//查询是否重复//账户List<LvshiEntity> lvshiEntities_username = lvshiService.selectList(new EntityWrapper<LvshiEntity>().in("username", seachFields.get("username")).eq("lvshi_delete", 1));if(lvshiEntities_username.size() >0 ){ArrayList<String> repeatFields = new ArrayList<>();for(LvshiEntity s:lvshiEntities_username){repeatFields.add(s.getUsername());}return R.error(511,"数据库的该表中的 [账户] 字段已经存在 存在数据为:"+repeatFields.toString());}//律师手机号List<LvshiEntity> lvshiEntities_lvshiPhone = lvshiService.selectList(new EntityWrapper<LvshiEntity>().in("lvshi_phone", seachFields.get("lvshiPhone")).eq("lvshi_delete", 1));if(lvshiEntities_lvshiPhone.size() >0 ){ArrayList<String> repeatFields = new ArrayList<>();for(LvshiEntity s:lvshiEntities_lvshiPhone){repeatFields.add(s.getLvshiPhone());}return R.error(511,"数据库的该表中的 [律师手机号] 字段已经存在 存在数据为:"+repeatFields.toString());}//律师身份证号List<LvshiEntity> lvshiEntities_lvshiIdNumber = lvshiService.selectList(new EntityWrapper<LvshiEntity>().in("lvshi_id_number", seachFields.get("lvshiIdNumber")).eq("lvshi_delete", 1));if(lvshiEntities_lvshiIdNumber.size() >0 ){ArrayList<String> repeatFields = new ArrayList<>();for(LvshiEntity s:lvshiEntities_lvshiIdNumber){repeatFields.add(s.getLvshiIdNumber());}return R.error(511,"数据库的该表中的 [律师身份证号] 字段已经存在 存在数据为:"+repeatFields.toString());}lvshiService.insertBatch(lvshiList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,"批量插入数据异常,请联系管理员");}}/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {LvshiEntity lvshi = lvshiService.selectOne(new EntityWrapper<LvshiEntity>().eq("username", username));if(lvshi==null || !lvshi.getPassword().equals(password))return R.error("账号或密码不正确");else if(lvshi.getLvshiDelete() != 1)return R.error("账户已被删除");String token = tokenService.generateToken(lvshi.getId(),username, "lvshi", "律师");R r = R.ok();r.put("token", token);r.put("role","律师");r.put("username",lvshi.getLvshiName());r.put("tableName","lvshi");r.put("userId",lvshi.getId());return r;}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody LvshiEntity lvshi, HttpServletRequest request) {
// ValidatorUtils.validateEntity(user);Wrapper<LvshiEntity> queryWrapper = new EntityWrapper<LvshiEntity>().eq("username", lvshi.getUsername()).or().eq("lvshi_phone", lvshi.getLvshiPhone()).or().eq("lvshi_id_number", lvshi.getLvshiIdNumber()).andNew().eq("lvshi_delete", 1);LvshiEntity lvshiEntity = lvshiService.selectOne(queryWrapper);if(lvshiEntity != null)return R.error("账户或者律师手机号或者律师身份证号已经被使用");lvshi.setLvshiDelete(1);lvshi.setCreateTime(new Date());lvshiService.insert(lvshi);return R.ok();}/*** 重置密码*/@GetMapping(value = "/resetPassword")public R resetPassword(Integer id, HttpServletRequest request) {LvshiEntity lvshi = lvshiService.selectById(id);lvshi.setPassword("123456");lvshiService.updateById(lvshi);return R.ok();}/*** 修改密码*/@GetMapping(value = "/updatePassword")public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) {LvshiEntity lvshi = lvshiService.selectById((Integer)request.getSession().getAttribute("userId"));if(newPassword == null){return R.error("新密码不能为空") ;}if(!oldPassword.equals(lvshi.getPassword())){return R.error("原密码输入错误");}if(newPassword.equals(lvshi.getPassword())){return R.error("新密码不能和原密码一致") ;}lvshi.setPassword(newPassword);lvshiService.updateById(lvshi);return R.ok();}/*** 忘记密码*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request) {LvshiEntity lvshi = lvshiService.selectOne(new EntityWrapper<LvshiEntity>().eq("username", username));if(lvshi!=null){lvshi.setPassword("123456");lvshiService.updateById(lvshi);return R.ok();}else{return R.error("账号不存在");}}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrLvshi(HttpServletRequest request){Integer id = (Integer)request.getSession().getAttribute("userId");LvshiEntity lvshi = lvshiService.selectById(id);if(lvshi !=null){//entity转viewLvshiView view = new LvshiView();BeanUtils.copyProperties( lvshi , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}
}
5.2 律师Service模块
package com.service;import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.LvshiEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable;
import java.util.List;/*** 律师 服务类*/
public interface LvshiService extends IService<LvshiEntity> {/*** @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.LvshiDao;
import com.entity.LvshiEntity;
import com.service.LvshiService;
import com.entity.view.LvshiView;/*** 律师 服务实现类*/
@Service("lvshiService")
@Transactional
public class LvshiServiceImpl extends ServiceImpl<LvshiDao, LvshiEntity> implements LvshiService {@Overridepublic PageUtils queryPage(Map<String,Object> params) {Page<LvshiView> page =new Query<LvshiView>(params).getPage();page.setRecords(baseMapper.selectListView(page,params));return new PageUtils(page);}}
5.4 律师Dao模块
package com.dao;import com.entity.LvshiEntity;
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.LvshiView;/*** 律师 Dao 接口** @author */
public interface LvshiDao extends BaseMapper<LvshiEntity> {List<LvshiView> selectListView(Pagination page,@Param("params")Map<String,Object> params);}
6、论文目录结构
7、源码获取
感谢大家的阅读,如有不懂的问题可以评论区交流或私聊!
喜欢文章可以点赞、收藏、关注、评论啦
→获取源码请私信←