当前位置: 首页 > news >正文

基于Java的招聘系统的设计与实现

末尾获取源码
开发语言:Java
Java开发工具:JDK1.8
后端框架:SSM
前端:Vue
数据库:MySQL5.7和Navicat管理工具结合
服务器:Tomcat8.5
开发软件:IDEA / Eclipse
是否Maven项目:是


目录

一、项目简介

二、系统功能

三、系统项目截图

管理员功能实现

公司管理

用户管理

公告信息管理

公司功能实现

职位招聘管理

简历投递管理

邀请面试管理

用户功能实现

公司信息

职位招聘

简历管理

邀请面试查看

四、核心代码

登录相关

文件上传

封装


一、项目简介

如今社会上各行各业,都喜欢用自己行业的专属软件工作,互联网发展到这个时候,人们已经发现离不开了互联网。新技术的产生,往往能解决一些老技术的弊端问题。因为传统公司招聘信息管理难度大,容错率低,管理人员处理数据费工费时,所以专门为解决这个难题开发了一个基于Java的招聘系统,可以解决许多问题。

基于Java的招聘系统实现的功能包括职位招聘管理,简历管理,邀请面试管理,简历投递管理,公告管理,公司管理等功能。该系统采用了Mysql数据库,Java语言,SSM框架等技术进行编程实现。

基于Java的招聘系统可以提高公司招聘信息管理问题的解决效率,优化公司招聘信息处理流程,保证公司招聘信息数据的安全,它是一个非常可靠,非常安全的应用程序。


二、系统功能

管理员权限操作的功能包括对公司,用户,公告,职位招聘信息,简历投递信息,简历信息等进行管理。

公司权限操作的功能包括管理简历投递信息,管理邀请面试信息,管理职位招聘信息等。 

 用户权限操作的功能包括投递简历,管理简历,查看职位招聘信息,对职位招聘信息进行留言,查看邀请面试信息等。



三、系统项目截图

管理员功能实现

公司管理

管理员在公司管理界面中具备更改公司账户信息,包括更改密码,更改联系方式,邮箱等信息,可以删除需要删除的公司的信息。

 

用户管理

管理员在用户管理界面中具备更改用户的密码,更改用户的手机号等信息,可以删除需要删除的用户等。

 

公告信息管理

管理员在公告信息管理界面具备修改公告图片,内容,标题等信息,以及对公告删除等权限。

 

公司功能实现

职位招聘管理

公司在职位招聘管理界面中具备新增职位招聘信息,更改职位招聘的电话,招聘岗位,薪资待遇等信息,以及删除职位招聘信息等权限。

 

简历投递管理

公司在简历投递管理界面中具备查询简历投递信息,对用户投递的简历信息的详情信息进行查看,以及删除用户投递的简历信息等权限。

 

邀请面试管理

公司在邀请面试管理界面中新增邀请用户面试的信息,更改邀请面试的信息以及删除邀请面试的信息等。

 

用户功能实现

公司信息

用户在公司信息界面中对公司的所在行业,联系方式等信息进行查看。

 

职位招聘

用户在职位招聘界面中可以收藏招聘的职位信息,可以对职位发布个人留言信息,可以点击投递简历按钮对该职位进行简历投放。

 

简历管理

用户在简历管理界面中主要是增删改查个人简历信息。个人简历信息包括工作经历,期望工资,求职意向等信息。

 

邀请面试查看

用户在邀请面试查看界面中主要是查询邀请面试的信息,点击信息显示栏右侧的详情按钮可以查看公司邀请用户面试的详细信息等。

 


四、核心代码

登录相关


package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

文件上传

package com.controller;import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;/*** 上传文件映射表*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{@Autowiredprivate ConfigService configService;/*** 上传文件*/@RequestMapping("/upload")public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {if (file.isEmpty()) {throw new EIException("上传文件不能为空");}String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}String fileName = new Date().getTime()+"."+fileExt;File dest = new File(upload.getAbsolutePath()+"/"+fileName);file.transferTo(dest);FileUtils.copyFile(dest, new File("C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload"+"/"+fileName));if(StringUtils.isNotBlank(type) && type.equals("1")) {ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));if(configEntity==null) {configEntity = new ConfigEntity();configEntity.setName("faceFile");configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put("file", fileName);}/*** 下载文件*/@IgnoreAuth@RequestMapping("/download")public ResponseEntity<byte[]> download(@RequestParam String fileName) {try {File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}File file = new File(upload.getAbsolutePath()+"/"+fileName);if(file.exists()){/*if(!fileService.canRead(file, SessionManager.getSessionUser())){getResponse().sendError(403);}*/HttpHeaders headers = new HttpHeaders();headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    headers.setContentDispositionFormData("attachment", fileName);    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);}} catch (IOException e) {e.printStackTrace();}return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);}}

封装

package com.utils;import java.util.HashMap;
import java.util.Map;/*** 返回数据*/
public class R extends HashMap<String, Object> {private static final long serialVersionUID = 1L;public R() {put("code", 0);}public static R error() {return error(500, "未知异常,请联系管理员");}public static R error(String msg) {return error(500, msg);}public static R error(int code, String msg) {R r = new R();r.put("code", code);r.put("msg", msg);return r;}public static R ok(String msg) {R r = new R();r.put("msg", msg);return r;}public static R ok(Map<String, Object> map) {R r = new R();r.putAll(map);return r;}public static R ok() {return new R();}public R put(String key, Object value) {super.put(key, value);return this;}
}

http://www.lryc.cn/news/256130.html

相关文章:

  • spring boot整合mybatis进行部门管理管理的增删改查
  • 微软 Power Platform 零基础 Power Pages 网页搭建高阶实际案例实践(四)
  • 如何在任何STM32上面安装micro_ros
  • 肖sir__ 项目讲解__项目数据
  • 微服务实战系列之J2Cache
  • 12.ROS导航模块:gmapping、AMCL、map_server、move_base案例
  • C++中string类的使用
  • LeeCode每日刷题12.8
  • 硕士毕业论文格式修改要点_word
  • 远红外温和护理,一贴缓解痛风不适
  • 优化 SQL 日志记录的方法
  • Java设计模式-工厂模式
  • 每天五分钟计算机视觉:稠密连接网络(DenseNet)
  • mysql支持的整数类型、各类型整数能够表示的数值范围
  • 我不是DBA之慢SQL诊断方式
  • JavaScript基础知识整理(最全知识点, 精简版,0基础版)
  • 人工智能和网络安全:坏与好
  • 基于SSH的java记账管理系统
  • github可访问但无法clone问题
  • WebGL笔记:图形缩放的原理和实现
  • 前端学习--React(5)
  • 【数据结构】平衡树引入
  • 机器视觉相机镜头光源选型
  • Appium:iOS测试比Android测试更难?
  • 使用c#罗列、监视、控制进程
  • Vue:绘制图例
  • Web(8)SQL注入
  • kafka入门(三):kafka多线程消费
  • android通过广播打印RAM信息
  • C++新经典模板与泛型编程:策略类模板