基于springboot高校就业招聘系统设计和实现pf

@TOC

springboot480基于springboot高校就业招聘系统设计和实现pf

第1章 绪论

1.1 研究背景

互联网概念的产生到如今的蓬勃发展,用了短短的几十年时间就风靡全球,使得全球各个行业都进行了互联网的改造升级,标志着互联网浪潮的来临。在这个新的时代,各行各业都充分考虑互联网是否能与本行业进行结合,是否能解决本行业或者本行业中某些方面的自古以来的痛点。长期以来,数据内容,数据传播,数据储存等都是一门门专业的内容,因为需要记住的内容很多,造成古人的言简意赅,如今互联网的到来让数据更加的清晰好认不复杂,一目了然不出错,毕竟在整个历史上数据的丢失,传承的断代,都是因为数据不能好好的保存,不能好好的流传。当年的年代用互联网思维和互联网技术,对大量数据的录入更新,存储汇总,备份分析方面,使得远远的超过传统的数据管理技术。在这样的时代潮流下,采用新技术开发新软件,对传统行业进行革命性的改造成为了当今的主流。本次开发高校就业招聘系统,解决了企业招聘信息管理关于数据方面的管理分析,存储传输的痛点,不仅仅对管理员提供了便利,还能提高用户的满意度。

1.2目的和意义

此次高校就业招聘系统的开发,需要用到的知识不仅涉及到界面设计与功能设计方面的知识,还需要涉及到数据库与编程语言上面的知识,这些知识点对于一个即将毕业的学生来说,一是为了巩固在校所学相关专业知识;二是为了让学生学会如何将专业理论知识运用于现实软件的开发过程;三是让学生明白知识是无穷无尽的,要时刻明白活到老学到老的真正含义,让学生要养成时刻学习的习惯,同时也要相信通过此次程序的开发,会让学生对于专业知识的理解与软件开发水平的提高有着极大的帮助。

1.3 论文研究内容

论文设计的结构也是依照程序开发的流程进展的,也涉及到功能需求分析,功能设计与实现,程序测试等流程。

绪论:讲解课题的背景与意义,展示论文结构。

程序开发技术:讲解程序运用到的工具与技术知识。

系统分析:讲解程序的功能需求与开发可行性问题。

系统设计:讲解程序的功能与数据库的设计。

系统实现:讲解程序功能与界面实现。

系统测试:讲解程序的功能测试。

第2章 程序开发技术

2.1 MySQL数据库

开发的程序面向用户的只是程序的功能界面,让用户操作程序界面的各个功能,那么很多人就会问,用户使用程序功能生成的数据信息放在哪里的?这个就需要涉及到数据库的知识了,一般来说,程序开发通常就会对常用数据存储工具的特点进行分析比对,比如MySQL数据库的特点与优势,Access数据库的特点与优势,SqlServer数据库的特点与优势等,最终看哪个数据库与需要开发的程序比较匹配,也符合程序功能运行需要的数据存储要求,比如,需要开发商业级别的程序,存储的数据对数据库要求较高,可以选用Oracle,如果只是比较简单的程序,对数据存储没有过多要求,可以选用微软旗下的Access,当开发程序要求数据库占用空间小,并能满足程序数据存储要求时,就可以考虑Oracle公司从瑞典MySQL AB公司在很早之前就收购过一个关系型数据库,它是现在的MySQL数据库。

为了更容易理解MySQL数据库,接下来就对其具备的主要特征进行描述。

(1)首选MySQL数据库也是为了节省开发资金,因为网络上对MySQL的源码都已进行了公开展示,开发者根据程序开发需要可以进行下载,并做一些改动就可以使用在程序中,可以推动开发者开发此程序的开发进度。

(2)SQL数据语言在MySQL里面也同样适用

(3)MySQL不仅可以支持多种编程语言,比如在校期间学到的C语言,Java语言,以及课后接触的PHP语言,C++语言等编程语言,它都能很好的支持,而且MySQL的安装与使用还不挑剔使用平台。

(4)MySQL可以支持具有千万条数据记录的数据库,电脑操作系统在进行首次安装或者是重装时,可以根据需要选择安装32位或64位操作系统,这两种操作系统对表文件的支持力度不一样,32位的操作系统最多可以存放4GB的表文件,64位操作系统最多可以存放8TB的表文件。

(5)MySQL数据库可以通过GPL协议进行个性化定制,需要开发者自己对数据库的源代码进行修改,以此开发出属于自己的MySQL。

2.2 Java语言

程序开发语言有很多,但是截至目前,Java语言在IT领域内,仍然是最被认可,以及被广泛运用的编写语言之一,因此在选择此程序的编写语言上,果断选择这门编程语言进行程序开发。可以说经过了这么多年的发展,Java语言不仅在Web开发领域有了突出性贡献,而且在大数据开发领域以及Android开发领域都得到了广泛运用。由于Java语言拥有较强的扩展性能,并且表现出的稳定性能,让其成为大型后端系统开发语言首选,现如今,Java语言也成为了一种常用的互联网平台的解决方案。

作为一种源码在网络上开源的面向对象的程序开发Java语言,由它开发完成的程序是不可能直接运行在各大平台的,Java程序的运行,需要在操作平台上配置其运行的环境,包括数据库软件与Java程序开发软件等工具的安装与配置。在Win7,Win10或其它操作平台上配置Java程序运行环境,只要环境配置成功,Java程序都可以运行起来。

第3章 系统分析

在进行系统分析之前,需要从网络上或者是图书馆的开发类书籍中收集大量的资料,因为这个环节也是帮助即将开发的程序软件制定一套最优的方案,一旦确定了程序软件需要具备的功能,就意味着接下来的工作和任务都是围绕着这个方案执行的,所以系统分析需要对程序功能反复进行思考和研究。

3.1可行性分析

开发一款系统软件之前,用户都会思考这个软件程序值不值得去开发,把开发软件过程中可能涉及到的问题罗列出来,并一个个分析解决,以此来确定开发这款程序软件是否有必要,这样的分析方法也能帮助用户降低损失,不至于开发者开发进度进行到一半之后,突然遇到问题就放弃对软件的开发,到那时,资金损失,人力投入等方面就损耗太大了。

3.1.1技术可行性分析

此次开发程序使用到的开发工具有:Eclipse,MySQL等工具,使用的开发语言是Java,选择的开发工具和开发语言都是在大学课堂接触并学习过,后期因为自己也比较感兴趣,所以也通过网络渠道,或借助图书馆的开发类书籍进行过软件开发知识的系统学习,让自己有了一定的知识积累,加上自己在校期间也独立开发过一些软件作品,也积累了一定的开发经验,所以这次毕设作品的制作在技术上无须担忧过多。

3.1.2经济可行性分析

目前的信息时代,对信息的管理趋于高效化,便捷化,这也是计算机大力普及所带来的便利,此程序软件在设备选用上,依靠的是比较大众的电脑设备,对电脑的配置没有过多要求,一般学校的计算机机房的电脑都可以满足程序开发需求,另外,开发出此款程序,让信息处理变得高效率,其所带来的高效益是远超程序开发的低成本的,因此程序开发的资金投入是可以忽略不计的。

3.1.3操作可行性分析

程序软件的操作界面是符合大众审美的需求,功能模块的布局也是类似于社会上同种类型的软件,因此使用者操作该软件可以无需培训就上手。加上现在计算机入驻各家各户,大部分人的计算机操作水平都比较高,这样的局面也表明开发出来的程序在操作性问题上也是不用担心的。

综合上面的可行性论证,基本可以确定程序开发完全可行。

3.2系统运行环境

程序经过编码可以实现对程序设计的功能。但是编码实现时需要一定的配置环境,包括了电脑上的硬件环境,也包括在电脑操作系统上安装的软件环境。

硬件环境:一台可以正常使用并能够上网的笔记本或者是电脑,电脑内存最低要求4个G,电脑的中央处理器可以配置i5CPU。

软件环境:运用的微软操作系统是比较稳定的win7旗舰版系统,采用比较熟练360安全浏览器,并在此系统上通过浏览器下载安装好Eclipse软件,下载安装好MySQL软件等。

3.3系统流程分析

分析程序的流程,涉及到程序的整体操作流程,通过分析与设计,绘制的程序操作流程图见下图。此程序为了确保安全,会让使用者通过登录模块验证信息,符合要求的使用者才有权限操作程序。

图3-1 程序操作流程图

程序处理数据会涉及到数据的录入环节,绘制的添加流程见下图。程序录入数据过程中,始终与数据库保持同步。

图3-2 信息添加流程图

程序里面的数据也会出现错误,因此就有相应的修改数据的功能,绘制的程序修改流程见下图。此过程也是跟后台数据库进行数据同步显示。

图3-3信息修改流程图

程序数据存放于数据仓库,有时也会涉及到数据删除,此过程对应的流程图见下图。数据信息被删除之后,数据库里面也就没有了该数据信息了。

图3-4 信息删除流程图

第4章 系统设计

4.1 系统设计的原则

在系统设计过程中,也需要遵循相应的设计原则,这些设计原则可以帮助设计者在短时间内设计出符合设计规范的设计方案。设计原则主要有可靠性,安全性,可定制化,可扩展性,可维护性,可升级性以及客户体验等原则。下面就对这些原则进行简要阐述。

可靠性:一个软件是否可靠决定了其是否被用户使用,设计不可靠的软件,用户很容易就遗弃;

安全性:程序软件承担了信息的保存与管理等事务,安全性不足的软件会导致使用者承担巨大的损失;所以系统安全也是需要考虑进入的;

可定制化:市场环境从来都不是一直固定不变,面对客户群体的改变,以及使用环境的改变,市场需求的改变等因素,程序软件也要易于调整以适应各种变化;

可扩展性:程序软件在运行使用期间,也需要及时引进当下的新技术来进行系统优化,主要就是在系统功能层面,系统性能层面上进行相应的扩展,只有这样才能让系统在实际生活中继续占有市场;

可维护性:程序软件的维护需要一定量的资金,不管是排除现有程序错误,还是变更软件的现有需求,都需要在软件技术上投入一定资金,所以易于维护的软件程序就可以降低技术层面的资金消耗;

可升级性:程序软件的投入使用,会面临用户数量增多的情况,用户对软件的使用率也会提升,所以系统面临这种情况,仍然需要通过升级保持性能的合理,这样才能够适应市场;

客户体验:设计出来的程序软件在界面上不能够太复杂,要遵循界面设计的原理设计出简单,方便操作的功能操作界面,让用户易于接受软件,并乐于使用软件提供的功能。

4.2 系统结构设计

在系统结构设计上,经综合考虑还是选择比js更加简洁的vue框架,现如今浏览器已经实现了普及,并在技术上逐渐完善和成熟,它在节约软件开发成本的基础上,还能实现原本用专业软件操作才能实现的强大功能。总之,小程序架构是当下全新的,认可度高的系统构造技术。系统结构设计图通过绘制,效果展示如下:

图4-1 系统结构设计图

4.3功能结构设计

在管理员功能模块确定下来的基础上,对管理员各个功能进行设计,确定管理员功能的详细模块。绘制的管理员功能结构见下图。

结构设计图

图4.3 管理员功能结构图

4.4数据库设计

与功能结构设计一样,数据库设计也是程序开发不可避免的设计环节,数据库设计最主要的目的就是帮助运行程序存储相应的数据信息。数据库设计包含的内容有数据表结构的设计,也包含了数据库E-R图的设计。

4.4.1 数据库E-R图

在绘制E-R图之前,先要找出数据库的实体,明确各个实体具有的属性,比如用户信息这个实体,它具备的属性包括了用户的姓名属性,用户的密码属性,用户的创建时间属性等,所以明确了用户这个实体,以及用户实体具备的属性之后,就需要根据这些信息绘制用户实体对应的实体属性图了。绘制软件选用当下认可度高,使用范围广,操作便利的微软旗下的Visio工具。

(1)下图是招聘招聘公告实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\招聘公告.jpg

招聘招聘公告实体属性图

(2)下图是用户实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\用户.jpg

用户实体属性图

(3)下图是职位留言实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\职位留言.jpg

职位留言实体属性图

(4)下图是字典表实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\字典表.jpg

字典表实体属性图

(5)下图是辅导员实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\辅导员.jpg

辅导员实体属性图

(6)下图是简历实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\简历.jpg

简历实体属性图

(7)下图是简历投递实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\简历投递.jpg

简历投递实体属性图

(8)下图是就业知识收藏实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\就业知识收藏.jpg

就业知识收藏实体属性图

(9)下图是毕业去向实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\毕业去向.jpg

毕业去向实体属性图

(10)下图是企业实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\企业.jpg

企业实体属性图

(11)下图是职位收藏实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\职位收藏.jpg

职位收藏实体属性图

(12)下图是就业知识实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\就业知识.jpg

就业知识实体属性图

(13)下图是职位招聘实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\职位招聘.jpg

职位招聘实体属性图

(14)下图是就业知识留言实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\就业知识留言.jpg

就业知识留言实体属性图

(15)下图是就业咨询实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\3.1\____img\就业咨询.jpg

就业咨询实体属性图

4.4.2 数据库表结构

在进行这部分设计之前,需要明白和掌握数据类型以及各个数据类型的长度范围等知识,因为在一张具体的数据表中,为了方便理解,这里就举个简单的例子。比如用户信息表,这个表格的字段就是用户这个实体具备的属性,这时就需要对字段进行数据类型,以及字段长度的设置,也要设置一个主键来作为用户信息表的唯一标识。这些都是数据库表结构设计需要完成的内容。根据高校就业招聘系统的功能设计以及数据库设计要求,展示该系统的数据表结构。

表4.1毕业去向表

序号列名数据类型说明允许空
1IdIntid
2yonghu_idInteger用户
3biyequxiang_uuid_numberString毕业去向编号
4biyequxiang_typesInteger毕业去向类型
5biyequxiang_fileString附件
6gongsi_nameString公司名称
7gongsi_addressString公司位置
8biyequxiang_xinziInteger薪资
9biyequxiang_timeDate去往时间
10biyequxiang_contentString详细信息
11insert_timeDate录入时间
12create_timeDate创建时间

表4.2就业咨询表

序号列名数据类型说明允许空
1IdIntid
2yonghu_idInteger提问用户
3chat_issueString问题
4issue_timeDate问题时间
5chat_replyString回复
6reply_timeDate回复时间
7zhuangtai_typesInteger状态
8chat_typesInteger数据类型
9insert_timeDate创建时间

表4.3字典表表

序号列名数据类型说明允许空
1IdIntid
2dic_codeString字段
3dic_nameString字段名
4code_indexInteger编码
5index_nameString编码名字
6super_idInteger父字段id
7beizhuString备注
8create_timeDate创建时间

表4.4辅导员表

序号列名数据类型说明允许空
1IdIntid
2fudaoyuan_nameString辅导员姓名
3fudaoyuan_photoString照片
4fudaoyuan_phoneString辅导员手机号
5fudaoyuan_id_numberString辅导员身份证号
6fudaoyuan_emailString邮箱
7fudaoyuan_deleteInteger假删
8create_timeDate创建时间

表4.5招聘招聘公告表

序号列名数据类型说明允许空
1IdIntid
2gonggao_nameString招聘招聘公告标题
3gonggao_photoString招聘招聘公告图片
4gonggao_typesInteger招聘招聘公告类型
5insert_timeDate招聘招聘公告发布时间
6gonggao_contentString招聘招聘公告详情
7create_timeDate创建时间

表4.6简历表

序号列名数据类型说明允许空
1IdIntid
2yonghu_idInteger用户
3jianli_uuid_numberString简历唯一编号
4jianli_nameString简历标题
5jianli_xingmingString姓名
6jianli_typesInteger求职意向
7jianli_xinziString期望工资
8jianli_xueliString学历
9jianli_jingliString工作经历
10sex_typesInteger性别
11jianli_fileString简历文件
12jianli_phoneString手机号
13jianli_photoString照片
14jianli_addressString现在位置
15jiaoyu_textString教育经历
16shixi_textString实习或工作经历
17geren_textString个人介绍
18create_timeDate创建时间

表4.7就业知识表

序号列名数据类型说明允许空
1IdIntid
2jiuyezhishi_nameString就业知识名称
3jiuyezhishi_uuid_numberString就业知识编号
4jiuyezhishi_photoString就业知识照片
5jiuyezhishi_fileString附件
6jiuyezhishi_videoString就业知识视频
7zan_numberInteger
8cai_numberInteger
9jiuyezhishi_typesInteger就业知识类型
10jiuyezhishi_clicknumInteger就业知识热度
11jiuyezhishi_contentString就业知识介绍
12shangxia_typesInteger是否上架
13jiuyezhishi_deleteInteger逻辑删除
14insert_timeDate录入时间
15create_timeDate创建时间

表4.8就业知识收藏表

序号列名数据类型说明允许空
1IdIntid
2jiuyezhishi_idInteger就业知识
3yonghu_idInteger用户
4jiuyezhishi_collection_typesInteger类型
5insert_timeDate收藏时间
6create_timeDate创建时间

表4.9就业知识留言表

序号列名数据类型说明允许空
1IdIntid
2jiuyezhishi_idInteger就业知识
3yonghu_idInteger用户
4jiuyezhishi_liuyan_textString留言内容
5insert_timeDate留言时间
6reply_textString回复内容
7update_timeDate回复时间
8create_timeDate创建时间

表4.10企业表

序号列名数据类型说明允许空
1IdIntid
2qiye_nameString企业名称
3qiye_typesInteger企业类型
4qiye_phoneString联系方式
5qiye_emailString邮箱
6qiye_photoString企业logo
7qiye_chenglishijian_timeDate企业成立时间
8qiye_contentString企业介绍
9qiye_deleteInteger逻辑删除
10create_timeDate创建时间

表4.11用户表

序号列名数据类型说明允许空
1IdIntid
2yonghu_nameString用户姓名
3yonghu_photoString头像
4yonghu_phoneString用户手机号
5yonghu_id_numberString用户身份证号
6yonghu_emailString邮箱
7yonghu_deleteInteger假删
8create_timeDate创建时间

表4.12职位招聘表

序号列名数据类型说明允许空
1IdIntid
2qiye_idInteger企业
3zhaopin_nameString招聘信息名称
4zhaopin_photoString招聘信息照片
5zhaopin_daiyuString薪资待遇
6zhaopin_addressString上班地点
7lianxiren_nameString联系人
8zhaopin_phoneString招聘电话
9zhaopin_typesInteger招聘岗位
10leixing_typesInteger招聘类型
11zan_numberInteger
12cai_numberInteger
13zhaopin_renshu_numberInteger招聘人数
14shangxia_typesInteger是否上架
15zhaopin_contentString招聘信息详情
16create_timeDate创建时间

表4.13职位收藏表

序号列名数据类型说明允许空
1IdIntid
2zhaopin_idInteger职位
3yonghu_idInteger用户
4zhaopin_collection_typesInteger类型
5insert_timeDate收藏时间
6create_timeDate创建时间

表4.14职位留言表

序号列名数据类型说明允许空
1IdIntid
2zhaopin_idInteger职位
3yonghu_idInteger用户
4zhaopin_liuyan_textString留言内容
5reply_textString回复内容
6insert_timeDate留言时间
7update_timeDate回复时间
8create_timeDate创建时间

表4.15简历投递表

序号列名数据类型说明允许空
1IdIntid
2jianli_idInteger简历
3zhaopin_idInteger招聘
4insert_timeDate投递时间
5zhaopin_toudi_yesno_typesInteger审核状态
6zhaopin_toudi_yesno_textString投递回复
7zhaopin_toudi_shenhe_timeDate回复时间
8create_timeDate创建时间

表4.16管理员表

序号列名数据类型说明允许空
1IdIntid
2usernameString学生名
3passwordString密码
4roleString角色
5addtimeDate新增时间
  1. 系统实现

系统实现这个章节的内容主要还是展示系统的功能界面设计效果,在实现系统基本功能,比如修改,比如添加,比如删除等管理功能的同时,也显示出系统各个功能的界面实现效果,该部分内容一方面与前面提到的系统分析,系统设计的内容相呼应,另一方面也是一个实际成果的展示。

5.1管理员功能实现

5.1.1 职位招聘管理

此页面让管理员管理职位招聘的数据,职位招聘管理页面见下图。此页面主要实现职位招聘的增加、修改、删除、查看的功能。

图5-1 职位招聘管理页面

5.1.2 招聘公告信息管理

招聘公告信息管理页面提供的功能操作有:新增招聘公告,修改招聘公告,删除招聘公告操作。下图就是招聘公告信息管理页面。

图5.3 招聘公告信息管理页面

5.1.3招聘公告类型管理

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

图5.4 招聘公告类型列表页面

5.1.4 就业知识管理

如图5.4显示的就是就业知识管理页面,此页面提供给管理员的功能有:新增就业知识,修改就业知识,删除就业知识。

图5.4就业知识管理页面

5.1.5 就业知识类型管理

如图5.5显示的就是就业知识类型管理页面,此页面提供给管理员的功能有:新增就业知识类型,修改就业知识类型,删除就业知识类型。

图5.5 就业知识类型管理页面

第6章 系统测试

程序软件的开发阶段也包括了系统测试,这个部分就是程序质量评定的一个重要环节,如果说程序通过编码实现功能之后,不通过测试检查程序中出现的错误,那么程序一旦投入生活中运行使用时,就会产生许多大大小小的错误,这个时候去解决问题已经晚了,所以一个程序在被交付给使用者使用之前,开发者就需要使用多种测试方法反复进行测试,也是对程序的一个负责表现。程序进入系统测试阶段,在讲究策略进行测试时,也需要对时效性进行把控。当开发者测试完程序,并解决完测试期间程序产生的各种错误时,就需要程序的验收方来对程序进行验收测试,这也是程序测试的最后一个操作步骤。验收测试也是对程序的质量以及可交付性方面起到关键的作用。

GonggaoServiceImpl.java
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.GonggaoDao;
import com.entity.GonggaoEntity;
import com.service.GonggaoService;
import com.entity.view.GonggaoView;

/**
 * 招聘公告 服务实现类
 */
@Service("gonggaoService")
@Transactional
public class GonggaoServiceImpl extends ServiceImpl<GonggaoDao, GonggaoEntity> implements GonggaoService {

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


}

ZhaopinCollectionServiceImpl.java
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.ZhaopinCollectionDao;
import com.entity.ZhaopinCollectionEntity;
import com.service.ZhaopinCollectionService;
import com.entity.view.ZhaopinCollectionView;

/**
 * 职位收藏 服务实现类
 */
@Service("zhaopinCollectionService")
@Transactional
public class ZhaopinCollectionServiceImpl extends ServiceImpl<ZhaopinCollectionDao, ZhaopinCollectionEntity> implements ZhaopinCollectionService {

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


}

list.vue
<template>
    <div class="main-content">
        <!-- 列表页 -->
        <div v-if="showFlag">
            <el-form :inline="true" :model="searchForm" class="form-content">
                <el-row :gutter="20" class="slt" :style="{justifyContent:contents.searchBoxPosition=='1'?'flex-start':contents.searchBoxPosition=='2'?'center':'flex-end'}">
                    <el-form-item label="就业知识类型">
                        <el-input prefix-icon="el-icon-search" v-model="searchForm.indexNameSearch" placeholder="就业知识类型" clearable></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button icon="el-icon-search" type="success" @click="search()">查询</el-button>
                    </el-form-item>
                </el-row>
                <el-row class="ad" :style="{justifyContent:contents.btnAdAllBoxPosition=='1'?'flex-start':contents.btnAdAllBoxPosition=='2'?'center':'flex-end'}">
                    <el-form-item>
                        <el-button
                                v-if="isAuth('dictionaryJiuyezhishi','新增')"
                                type="success"
                                icon="el-icon-plus"
                                @click="addOrUpdateHandler()"
                        >新增</el-button>
                        <el-button
                                v-if="isAuth('dictionaryJiuyezhishi','删除')"
                                :disabled="dataListSelections.length <= 0"
                                type="danger"
                                icon="el-icon-delete"
                                @click="deleteHandler()"
                        >删除</el-button>
                    </el-form-item>
                </el-row>
            </el-form>
            <div class="table-content">
                <el-table class="tables" :size="contents.tableSize" :show-header="contents.tableShowHeader"
                          :header-row-style="headerRowStyle" :header-cell-style="headerCellStyle"
                          :border="contents.tableBorder"
                          :fit="contents.tableFit"
                          :stripe="contents.tableStripe"
                          :row-style="rowStyle"
                          :cell-style="cellStyle"
                          :style="{width: '100%',fontSize:contents.tableContentFontSize,color:contents.tableContentFontColor}"
                          v-if="isAuth('dictionaryJiuyezhishi','查看')"
                          :data="dataList"
                          v-loading="dataListLoading"
                          @selection-change="selectionChangeHandler">
                    <el-table-column  v-if="contents.tableSelection"
                                      type="selection"
                                      header-align="center"
                                      align="center"
                                      width="50">
                    </el-table-column>
                    <el-table-column label="索引" v-if="contents.tableIndex" type="index" width="50" />
                    <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign"
                                      prop="codeIndex"
                                      header-align="center"
                                      label="就业知识类型编码">
                        <template slot-scope="scope">
                            {{scope.row.codeIndex}}
                        </template>
                    </el-table-column>
                    <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign"
                                      prop="indexName"
                                      header-align="center"
                                      label="就业知识类型名称">
                        <template slot-scope="scope">
                            {{scope.row.indexName}}
                        </template>
                    </el-table-column>
                    <!--<el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign"
                                      prop="beizhu"
                                      header-align="center"
                                      label="备注">
                        <template slot-scope="scope">
                            {{scope.row.beizhu}}
                        </template>
                    </el-table-column>-->
                    <el-table-column width="300" :align="contents.tableAlign"
                                     header-align="center"
                                     label="操作">
                        <template slot-scope="scope">
                            <el-button v-if="isAuth('dictionaryJiuyezhishi','查看')" type="success" icon="el-icon-tickets" size="mini" @click="addOrUpdateHandler(scope.row.id,'info')">详情</el-button>
                            <el-button v-if="isAuth('dictionaryJiuyezhishi','修改')" type="primary" icon="el-icon-edit" size="mini" @click="addOrUpdateHandler(scope.row.id)">修改</el-button>
                            <el-button v-if="isAuth('dictionaryJiuyezhishi','删除')" type="danger" icon="el-icon-delete" size="mini" @click="deleteHandler(scope.row.id)">删除</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <el-pagination
                        clsss="pages"
                        :layout="layouts"
                        @size-change="sizeChangeHandle"
                        @current-change="currentChangeHandle"
                        :current-page="pageIndex"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="Number(contents.pageEachNum)"
                        :total="totalPage"
                        :small="contents.pageStyle"
                        class="pagination-content"
                        :background="contents.pageBtnBG"
                        :style="{textAlign:contents.pagePosition==1?'left':contents.pagePosition==2?'center':'right'}"
                ></el-pagination>
            </div>
        </div>
        <!-- 添加/修改页面  将父组件的search方法传递给子组件-->
        <add-or-update v-if="addOrUpdateFlag" :parent="this" ref="addOrUpdate"></add-or-update>



    </div>
</template>
<script>
    import AddOrUpdate from "./add-or-update";
    import styleJs from "../../../utils/style.js";
    export default {
        data() {
            return {
                searchForm: {
                    key: ""
                },
                form:{},
                dataList: [],
                pageIndex: 1,
                pageSize: 10,
                totalPage: 0,
                dataListLoading: false,
                dataListSelections: [],
                showFlag: true,
                sfshVisiable: false,
                shForm: {},
                chartVisiable: false,
                addOrUpdateFlag:false,
                contents:null,
                layouts: '',



            };
        },
        created() {
            this.contents = styleJs.listStyle();
            this.init();
            this.getDataList();
            this.contentStyleChange()
        },
        mounted() {

        },
        filters: {
            htmlfilter: function (val) {
                return val.replace(/<[^>]*>/g).replace(/undefined/g,'');
            }
        },
        components: {
            AddOrUpdate,
        },
        methods: {
            contentStyleChange() {
                this.contentSearchStyleChange()
                this.contentBtnAdAllStyleChange()
                this.contentSearchBtnStyleChange()
                this.contentTableBtnStyleChange()
                this.contentPageStyleChange()
            },
            contentSearchStyleChange() {
                this.$nextTick(()=>{
                    document.querySelectorAll('.form-content .slt .el-input__inner').forEach(el=>{
                    let textAlign = 'left'
                    if(this.contents.inputFontPosition == 2) textAlign = 'center'
                if(this.contents.inputFontPosition == 3) textAlign = 'right'
                el.style.textAlign = textAlign
                el.style.height = this.contents.inputHeight
                el.style.lineHeight = this.contents.inputHeight
                el.style.color = this.contents.inputFontColor
                el.style.fontSize = this.contents.inputFontSize
                el.style.borderWidth = this.contents.inputBorderWidth
                el.style.borderStyle = this.contents.inputBorderStyle
                el.style.borderColor = this.contents.inputBorderColor
                el.style.borderRadius = this.contents.inputBorderRadius
                el.style.backgroundColor = this.contents.inputBgColor
            })
                if(this.contents.inputTitle) {
                    document.querySelectorAll('.form-content .slt .el-form-item__label').forEach(el=>{
                        el.style.color = this.contents.inputTitleColor
                    el.style.fontSize = this.contents.inputTitleSize
                    el.style.lineHeight = this.contents.inputHeight
                })
                }
                setTimeout(()=>{
                    document.querySelectorAll('.form-content .slt .el-input__prefix').forEach(el=>{
                    el.style.color = this.contents.inputIconColor
                el.style.lineHeight = this.contents.inputHeight
            })
                document.querySelectorAll('.form-content .slt .el-input__suffix').forEach(el=>{
                    el.style.color = this.contents.inputIconColor
                el.style.lineHeight = this.contents.inputHeight
            })
                document.querySelectorAll('.form-content .slt .el-input__icon').forEach(el=>{
                    el.style.lineHeight = this.contents.inputHeight
            })
            },10)

            })
            },
            // 搜索按钮
            contentSearchBtnStyleChange() {
                this.$nextTick(()=>{
                    document.querySelectorAll('.form-content .slt .el-button--success').forEach(el=>{
                    el.style.height = this.contents.searchBtnHeight
                el.style.color = this.contents.searchBtnFontColor
                el.style.fontSize = this.contents.searchBtnFontSize
                el.style.borderWidth = this.contents.searchBtnBorderWidth
                el.style.borderStyle = this.contents.searchBtnBorderStyle
                el.style.borderColor = this.contents.searchBtnBorderColor
                el.style.borderRadius = this.contents.searchBtnBorderRadius
                el.style.backgroundColor = this.contents.searchBtnBgColor
            })
            })
            },
            // 新增、批量删除
            contentBtnAdAllStyleChange() {
                this.$nextTick(()=>{
                    document.querySelectorAll('.form-content .ad .el-button--success').forEach(el=>{
                    el.style.height = this.contents.btnAdAllHeight
                el.style.color = this.contents.btnAdAllAddFontColor
                el.style.fontSize = this.contents.btnAdAllFontSize
                el.style.borderWidth = this.contents.btnAdAllBorderWidth
                el.style.borderStyle = this.contents.btnAdAllBorderStyle
                el.style.borderColor = this.contents.btnAdAllBorderColor
                el.style.borderRadius = this.contents.btnAdAllBorderRadius
                el.style.backgroundColor = this.contents.btnAdAllAddBgColor
            })
                document.querySelectorAll('.form-content .ad .el-button--danger').forEach(el=>{
                    el.style.height = this.contents.btnAdAllHeight
                el.style.color = this.contents.btnAdAllDelFontColor
                el.style.fontSize = this.contents.btnAdAllFontSize
                el.style.borderWidth = this.contents.btnAdAllBorderWidth
                el.style.borderStyle = this.contents.btnAdAllBorderStyle
                el.style.borderColor = this.contents.btnAdAllBorderColor
                el.style.borderRadius = this.contents.btnAdAllBorderRadius
                el.style.backgroundColor = this.contents.btnAdAllDelBgColor
            })
                document.querySelectorAll('.form-content .ad .el-button--warning').forEach(el=>{
                    el.style.height = this.contents.btnAdAllHeight
                el.style.color = this.contents.btnAdAllWarnFontColor
                el.style.fontSize = this.contents.btnAdAllFontSize
                el.style.borderWidth = this.contents.btnAdAllBorderWidth
                el.style.borderStyle = this.contents.btnAdAllBorderStyle
                el.style.borderColor = this.contents.btnAdAllBorderColor
                el.style.borderRadius = this.contents.btnAdAllBorderRadius
                el.style.backgroundColor = this.contents.btnAdAllWarnBgColor
            })
            })
            },
            // 表格
            rowStyle({ row, rowIndex}) {
                if (rowIndex % 2 == 1) {
                    if(this.contents.tableStripe) {
                        return {color:this.contents.tableStripeFontColor}
                    }
                } else {
                    return ''
                }
            },
            cellStyle({ row, rowIndex}){
                if (rowIndex % 2 == 1) {
                    if(this.contents.tableStripe) {
                        return {backgroundColor:this.contents.tableStripeBgColor}
                    }
                } else {
                    return ''
                }
            },
            headerRowStyle({ row, rowIndex}){
                return {color: this.contents.tableHeaderFontColor}
            },
            headerCellStyle({ row, rowIndex}){
                return {backgroundColor: this.contents.tableHeaderBgColor}
            },
            // 表格按钮
            contentTableBtnStyleChange(){
            },
            // 分页
            contentPageStyleChange(){
                let arr = []
                if(this.contents.pageTotal) arr.push('total')
                if(this.contents.pageSizes) arr.push('sizes')
                if(this.contents.pagePrevNext){
                    arr.push('prev')
                    if(this.contents.pagePager) arr.push('pager')
                    arr.push('next')
                }
                if(this.contents.pageJumper) arr.push('jumper')
                this.layouts = arr.join()
                this.contents.pageEachNum = 10
            },

            init () {
            },
            search() {
                this.pageIndex = 1;
                this.getDataList();
            },
            // 获取数据列表
            getDataList() {
                this.dataListLoading = true;
                let params = {
                    page: this.pageIndex,
                    limit: this.pageSize,
                    sort: 'id',
                }
                if(this.searchForm.indexNameSearch!='' && this.searchForm.indexNameSearch!=undefined){
                    params['indexName'] = this.searchForm.indexNameSearch
                }
                //本表的
                params['dicCode'] = "jiuyezhishi_types"//编码名字
                params['dicName'] = "就业知识类型",//汉字名字
                this.$http({
                    url: "dictionary/page",
                    method: "get",
                    params: params
                }).then(({ data }) => {
                    if (data && data.code === 0) {
                    this.dataList = data.data.list;
                    this.totalPage = data.data.total;
                } else {
                    this.dataList = [];
                    this.totalPage = 0;
                }
                this.dataListLoading = false;
            });
            },
            // 每页数
            sizeChangeHandle(val) {
                this.pageSize = val;
                this.pageIndex = 1;
                this.getDataList();
            },
            // 当前页
            currentChangeHandle(val) {
                this.pageIndex = val;
                this.getDataList();
            },
            // 多选
            selectionChangeHandler(val) {
                this.dataListSelections = val;
            },
            // 添加/修改
            addOrUpdateHandler(id,type) {
                this.showFlag = false;
                this.addOrUpdateFlag = true;
                this.crossAddOrUpdateFlag = false;
                if(type!='info'){
                    type = 'else';
                }
                this.$nextTick(() => {
                    this.$refs.addOrUpdate.init(id,type);
            });
            },
            // 删除
            deleteHandler(id) {
                var ids = id
                        ? [Number(id)]
                        : this.dataListSelections.map(item => {
                    return Number(item.id);
            });
                this.$confirm(`确定进行[${id ? "删除" : "批量删除"}]操作?`, "提示", {
                    confirmButtonText: "确定",
                    cancelButtonText: "取消",
                    type: "warning"
                }).then(() => {
                    this.$http({
                    url: "dictionary/delete",
                    method: "post",
                    data: ids
                }).then(({ data }) => {
                    if (data && data.code === 0) {
                    this.$message({
                        message: "操作成功",
                        type: "success",
                        duration: 1500,
                        onClose: () => {
                        this.search();
                }
                });
                } else {
                    this.$message.error(data.msg);
                }
            });
            });
            },


        }

    };
</script>
<style lang="scss" scoped>
.slt {
    margin: 0 !important;
    display: flex;
  }

  .ad {
    margin: 0 !important;
    display: flex;
  }

  .pages {
    & /deep/ el-pagination__sizes{
      & /deep/ el-input__inner {
        height: 22px;
        line-height: 22px;
      }
    }
  }


  .el-button+.el-button {
    margin:0;
  }

  .tables {
	& /deep/ .el-button--success {
		height: 40px;
		color: #333;
		font-size: 14px;
		border-width: 2px;
		border-style: dashed ;
		border-color: rgba(255, 255, 255, 1);
		border-radius: 20px;
		background-color: var(--publicSubColor);
	}

	& /deep/ .el-button--primary {
		height: 40px;
		color: #333;
		font-size: 14px;
		border-width: 2px;
		border-style: dashed ;
		border-color: rgba(255, 255, 255, 1);
		border-radius: 20px;
		background-color: var(--publicSubColor);
	}

	& /deep/ .el-button--danger {
		height: 40px;
		color: #333;
		font-size: 14px;
		border-width: 2px;
		border-style: dashed ;
		border-color: rgba(255, 255, 255, 1);
		border-radius: 20px;
		background-color: var(--publicSubColor);
	}

    & /deep/ .el-button {
      margin: 4px;
    }
  }
	.form-content {
		background: transparent;
	}
	.table-content {
		background: transparent;
	}

	.tables /deep/ .el-table__body tr {
				background-color: rgba(255, 255, 255, 1) !important;
				color: rgba(92, 93, 95, 1) !important;
	 }
	.tables /deep/ .el-table__body tr.el-table__row--striped td {
	    background: transparent;
	}
	.tables /deep/ .el-table__body tr.el-table__row--striped {
		background-color: #F5F7FA !important;
		color: #606266 !important;
	}

	.tables /deep/ .el-table__body tr:hover>td {
	   background-color: #f5f5f5 !important;
		   color: #333 !important;
 	}</style>



声明

本博客适用于广泛的学术和教育用途,包括但不限于个人学习、开发设计,产品设计。仅供学习参考,旨在为读者提供深入理解和学术研究的材料。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值