基于Springboot实现就业管理系统
Posted 编程指南针
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了基于Springboot实现就业管理系统相关的知识,希望对你有一定的参考价值。
项目编号:BS-GX-007
开发技术:springboot+springmvc+mybatis
开发工具:IDEA
数据库:mysql5
运行启动:EmploymentApplication 启动类
功能:主要实现就业信息的管理,主要模块包含 就业信息管理,用户管理,就业信息分类统计查询,推荐就业功能等。
系统角色分为两个:
一是管理员用户:可以实现就业信息的添加、编辑、删除、查询操作,添加就业信息时要上传三方协议,可以对系统用户进行管理,可以查看分类的就业信息统计,并添加推荐就业信息,同时上传企业招聘文档
二是普通用户:可以实现就业信息的添加、查询操作,可以下载查看三方协议文档,可以查看分类的就业信息统计,并查看推荐就业信息,同时可以下载企业招聘文档
管理员用户主要运行界面如下:
登陆:
就业信息管理:
添加就业信息
按列筛选数据:
就业信息统计:
用户管理:
推荐就业功能
普通用户运行部分功能界面:
可以添加就业信息,查看就业信息并下载三方协议,但不能编辑和删除
可以查看就业统计情况:
可以查看就业推荐情况:但不能添加、修改和删除
以上是基于springboot实现的就业信息管理系统的基本功能。
部分核心代码:
package com.bjpowernode.employment.controller;
import com.bjpowernode.employment.common.CommonResult;
import com.bjpowernode.employment.mapper.entity.EmploymentInfo;
import com.bjpowernode.employment.service.EmploymentInfoService;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
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.multipart.MultipartFile;
import java.util.List;
import java.util.UUID;
@Controller
public class EmploymentInfoController
@Autowired
EmploymentInfoService employmentInfoService;
@RequestMapping("/employment/index", "/employment/employmentinfo")
public String index()
return "system/employmentinfo/employmentinfo";
@ResponseBody
@RequestMapping("/employment/getallinfo")
public CommonResult<List<EmploymentInfo>> getAllInfo(EmploymentInfo employmentInfo, @RequestParam("limit") int pageSize, @RequestParam("page") int pageNum)
Page<EmploymentInfo> pageInfo = employmentInfoService.getAllEmploymentInfo(employmentInfo, pageNum, pageSize);
CommonResult<List<EmploymentInfo>> rtInfoResult = CommonResult.generateSuccessResult(pageInfo.getTotal(), pageInfo.getResult());
return rtInfoResult;
@ResponseBody
@RequestMapping("/employment/getinfo")
public CommonResult<List<EmploymentInfo>> getinfo(EmploymentInfo info, @RequestParam("limit") int pageSize, @RequestParam("page") int pageNum)
List<EmploymentInfo> infoList = employmentInfoService.getEmploymentInfo(info, pageNum, pageSize);
CommonResult<List<EmploymentInfo>> rtInfoResult = CommonResult.generateSuccessResult(infoList.size(), infoList);
return rtInfoResult;
/**
* 添加就业信息
* @param info
* @return
*/
@ResponseBody
@RequestMapping("/employment/addinfo")
public CommonResult<Integer> addInfo(EmploymentInfo info)
info.setInformationId(UUID.randomUUID().toString());
employmentInfoService.addEmploymentInfo(info);
return CommonResult.generateSuccessResult(1, 1);
@ResponseBody
@RequestMapping("/employment/updateinfo")
public CommonResult<Integer> updateInfo(EmploymentInfo info)
employmentInfoService.updateEmploymentInfo(info);
return CommonResult.generateSuccessResult(1, 1);
@ResponseBody
@RequestMapping("/employment/delinfo/infoId")
public CommonResult<Integer> delInfo(@PathVariable("infoId") String infoId)
employmentInfoService.deleteEmploymentInfo(infoId);
return CommonResult.generateSuccessResult(1, 1);
package com.bjpowernode.employment.controller;
import com.bjpowernode.employment.common.CommonResult;
import com.bjpowernode.employment.service.EmploymentInfoService;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.Map;
@Controller
public class EmploymentStatisticController
@Autowired
EmploymentInfoService employmentInfoService;
@RequestMapping("/employment/statistic")
public String index()
return "system/employmentstatistic/employmentstatistic";
@ResponseBody
@RequestMapping("/employment/statistic/fieldName")
public CommonResult<List<Map<String, String>>> getStatisticData(@PathVariable("fieldName") String fieldName,
@RequestParam("limit") int pageSize, @RequestParam("page") int pageNum)
Page<Map<String, String>> pageInfo = employmentInfoService.getStudentCount(fieldName, pageNum, pageSize);
return CommonResult.generateSuccessResult(pageInfo.getTotal(), pageInfo.getResult());
package com.bjpowernode.employment.controller;
import com.bjpowernode.employment.common.CommonResult;
import com.bjpowernode.employment.mapper.entity.User;
import com.bjpowernode.employment.service.UserService;
import com.bjpowernode.employment.util.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class HomeController
@Autowired
UserService userService;
@RequestMapping("/","/employment")
public String index()
return "system/login";
@ResponseBody
@RequestMapping("/employment/login")
public CommonResult<User> login(User user)
user.setUserPwd(MD5Util.getMD5(user.getUserPwd()));
User loginUser = userService.getUserByAccount(user.getUserAccount());
if(loginUser == null || !loginUser.getUserPwd().equals(user.getUserPwd()))
return CommonResult.generateFailureResult("帐号或密码不正确", 1, null);
else
return CommonResult.generateSuccessResult(1, loginUser);
package com.bjpowernode.employment.controller;
import com.bjpowernode.employment.mapper.entity.User;
import com.bjpowernode.employment.service.UserService;
import com.bjpowernode.employment.common.CommonResult;
import com.bjpowernode.employment.util.MD5Util;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.UUID;
@Controller
public class UserController
@Autowired
UserService userService;
@RequestMapping("/employment/usermanage")
public String index()
return "system/usermanage/usermanage";
/**
* 查询所有用户
* @param user
* @param pageSize
* @param pageNum
* @return
*/
@ResponseBody
@RequestMapping("/employment/getallusers")
public CommonResult<List<User>> getAllUsers(User user, @RequestParam("limit") int pageSize, @RequestParam("page") int pageNum)
Page<User> pageInfo = userService.getAllUsers(user, pageNum, pageSize);
return CommonResult.generateSuccessResult(pageInfo.getTotal(), pageInfo.getResult());
@ResponseBody
@RequestMapping("/employment/getuserbyaccount/userAccount")
public CommonResult<User> getUserByAccount(@PathVariable("userAccount") String userAccount)
return CommonResult.generateSuccessResult(1, userService.getUserByAccount(userAccount));
@ResponseBody
@RequestMapping("/employment/adduser")
public CommonResult<Integer> addUser(User user)
user.setUserId(UUID.randomUUID().toString());
user.setUserPwd(MD5Util.getMD5(user.getUserPwd()));
userService.addUser(user);
return CommonResult.generateSuccessResult(1, 1);
@ResponseBody
@RequestMapping("/employment/updateuser")
public CommonResult<Integer> updateUser(User user)
userService.updateUser(user);
return CommonResult.generateSuccessResult(1, 1);
@ResponseBody
@RequestMapping("/employment/deluser/userId")
public CommonResult<Integer> delInfo(@PathVariable("userId") String userId)
userService.deleteUser(userId);
return CommonResult.generateSuccessResult(1, 1);
package com.bjpowernode.employment.service.impl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.bjpowernode.employment.mapper.EmploymentInfoMapper;
import com.bjpowernode.employment.mapper.entity.EmploymentInfo;
import com.bjpowernode.employment.service.EmploymentInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class EmploymentInfoServiceImpl implements EmploymentInfoService
@Autowired
EmploymentInfoMapper employmentInfoMapper;
/**
* 分页查询就业信息
* @param employmentInfo
* @param pageNum
* @param pageSize
* @return
*/
@Override
public Page<EmploymentInfo> getAllEmploymentInfo(EmploymentInfo employmentInfo, int pageNum, int pageSize)
Page<EmploymentInfo> pageInfo = PageHelper.startPage(pageNum, pageSize);
employmentInfoMapper.getAllEmploymentInfo(employmentInfo);
return pageInfo;
@Override
public List<EmploymentInfo> getEmploymentInfo(EmploymentInfo employmentInfo, int pageNum, int pageSize)
PageHelper.startPage(pageNum, pageSize);
return employmentInfoMapper.getEmploymentInfo(employmentInfo);
/**
* 分页显示学生就业统计信息
* @param fieldName
* @param pageNum
* @param pageSize
* @return
*/
@Override
public Page<Map<String, String>> getStudentCount(String fieldName, int pageNum, int pageSize)
Page<Map<String, String>> pageInfo = PageHelper.startPage(pageNum, pageSize);
employmentInfoMapper.getStudentCount(fieldName);
return pageInfo;
@Override
public void addEmploymentInfo(EmploymentInfo employmentInfo)
employmentInfoMapper.addEmploymentInfo(employmentInfo);
@Override
public void updateEmploymentInfo(EmploymentInfo employmentInfo)
employmentInfoMapper.updateEmploymentInfo(employmentInfo);
@Override
public void deleteEmploymentInfo(String infoId)
employmentInfoMapper.deleteEmploymentInfo(infoId);
package com.bjpowernode.employment.service.impl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.bjpowernode.employment.mapper.UserMapper;
import com.bjpowernode.employment.mapper.entity.User;
import com.bjpowernode.employment.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class UserServiceImpl implements UserService
@Autowired
UserMapper userMapper;
/**
* 查询所有用户
* @param user
* @param pageNum
* @param pageSize
* @return
*/
@Override
public Page<User> getAllUsers(User user, int pageNum, int pageSize)
Page<User> pageInfo = PageHelper.startPage(pageNum, pageSize);
userMapper.getAllUsers(user);
return pageInfo;
@Override
public User getUserById(String userId)
return userMapper.getUserById(userId);
@Override
public User getUserByAccount(String userAccount)
return userMapper.getUserByAccount(userAccount);
@Override
public void addUser(User user)
userMapper.addUser(user);
@Override
public void updateUser(User user)
userMapper.updateUser(user);
@Override
public void deleteUser(String userId)
userMapper.deleteUser(userId);
以上是关于基于Springboot实现就业管理系统的主要内容,如果未能解决你的问题,请参考以下文章
就业信息追踪|基于Springboot+Vue开发实现就业信息追踪系统
就业信息追踪|基于Springboot+Vue开发实现就业信息追踪系统
基于SpringBoot+mybatis+layui就业管理系统设计和实现