源码获取:俺的博客首页 "资源" 里下载!
项目介绍
本系统分为前后台,前台主要功能为:
三个角色:
用户、企业、管理员
用户注册登陆、首页、交流论坛、公告消息、招聘咨询、招聘信息、就业指导、拼图登陆验证
后台管理功能有:
轮播图管理、招聘信息、投递简历、面试通知、企业后台端(职位信息、简历投递)、个人后台端(简历投递、考勤信息、反馈中心)、资源管理、招聘资讯、咨询分类、交流管理、系统用户(管理员、学生、企业)、模块管理(招聘信息、行业分类、投递简历、面试通知、就业指导、就业信息、就业数据)、作品信息、线下活动、评价中心
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目
6.数据库:MySql 5.7版本;
技术栈
1. 后端:SpringBoot+MyBatis
2. 前端:JSP+HTML+bootstrap+jQuery+Mysql
使用说明
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,下载所需要的jar包;
首页展示:
注册页面:![](https://i-blog.csdnimg.cn/blog_migrate/c61b022f5d747aa501754e54d4b71b53.png)
内容编辑:
招聘信息列表:![](https://i-blog.csdnimg.cn/blog_migrate/df3082ff50a7717d3872c6c2ff5effe1.png)
首页轮播图展示:
企业用户后台招聘信息编辑:![](https://i-blog.csdnimg.cn/blog_migrate/3389c7646e78fa106a5602fdfae71e7f.png)
管理员后台登录:
管理员后台管理:![](https://i-blog.csdnimg.cn/blog_migrate/d29a709913c5bc40278c8cc5279c7a29.png)
管理员用户后台功能管理:![](https://i-blog.csdnimg.cn/blog_migrate/a9239fece547f10bfee959d2015a583b.jpeg)
用户管理控制层:
@Controller
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
/*-------------------管理员------------------------*/
@RequiresRoles("admin")
@GetMapping("/admin/show")
public String show(Model model){
ServerResponse serverResponse = userService.queryUserByName(null,1,8);
model.addAttribute("user",serverResponse.getData());
return "manage/user";
}
@RequiresRoles("admin")
@PostMapping("/admin/add")
@ResponseBody
public ServerResponse addUser(User user){
return userService.addUser(user);
}
@RequiresRoles("admin")
@PostMapping("/admin/query")
@ResponseBody
public ServerResponse query(String name,
@RequestParam(value = "pageIndex",defaultValue = "1",required = false)int pageIndex,
@RequestParam(value = "pageSize",defaultValue = "8",required = false)int pageSize){
return userService.queryUserByName(name,pageIndex,pageSize);
}
@RequiresRoles("admin")
@PostMapping("/admin/changeRole")
@ResponseBody
public ServerResponse changeRole(String name,int roleId){
return userService.changeRole(name,roleId);
}
@RequiresRoles("admin")
@DeleteMapping("/admin/delete/{id}")
@ResponseBody
public ServerResponse deleteByName(@PathVariable int id){
return userService.deleteUserById(id);
}
}
招聘管理控制层:
@Controller
@RequestMapping("/position")
public class PositionController {
private static final int flag = 1;
@Autowired
private PositionService positionService;
@Autowired
private UserService userService;
//展现页面
@GetMapping
public String show(Model model, HttpServletRequest request,
@RequestParam(value = "pageIndex",defaultValue = "1",required = false)int pageIndex,
@RequestParam(value = "pageSize",defaultValue = "5",required = false)int pageSize){
ServerResponse serverResponse = positionService.findAllBySocial(pageIndex,pageSize);
PageInfo pageInfo =(PageInfo) serverResponse.getData();
model.addAttribute("positions",pageInfo);
return "www/position";
}
@GetMapping("/getDetail")
public String getDetail(@RequestParam("pName")String pName,
Model model){
ServerResponse serverResponse = positionService.getDeatils(pName,flag);
model.addAttribute("detail",serverResponse.getData());
serverResponse = positionService.findByRandom(flag);
model.addAttribute("positions",serverResponse.getData());
return "www/detail";
}
@GetMapping("/findByCondiction")
@ResponseBody
public ServerResponse findByCondiction(@RequestParam(value = "condition",required = false,defaultValue = "") String condition,
@RequestParam(value = "keyWord",required = false,defaultValue = "")String keyWord,
@RequestParam(value = "pageIndex",defaultValue = "1",required = false)int pageIndex,
@RequestParam(value = "pageSize",defaultValue = "5",required = false)int pageSize,
HttpServletRequest request) {
List<String> pClassify = Lists.newArrayList();
List<String> workSite = Lists.newArrayList();
condition=condition.replaceAll("\\u00A0"," ");
if (StringUtils.isNotEmpty(condition)){
String[] arr = condition.trim().split(" ");
for (int i = 0; i <arr.length ; i++) {
arr[i] = arr[i].trim();
if (StringUtils.isNotBlank(arr[i])){
if (arr[i].contains(".")){ //说明是分类
//去掉“.”
int index = arr[i].lastIndexOf(".");
String a = arr[i].substring(0,index);
pClassify.add(a.trim());
}else { //是地址
workSite.add(arr[i]);
}
}
}
}
ServerResponse serverResponse = positionService.findByCondiction(pClassify,workSite,null,flag,keyWord,pageIndex,pageSize);
return serverResponse;
}
//关键字搜索
// @GetMapping("/findByKeyWord")
// @ResponseBody
public ServerResponse findByKeyWord(@RequestParam(value = "keyWord",required = false,defaultValue = "")String keyWord,
@RequestParam(value = "pageIndex",defaultValue = "1",required = false)int pageIndex,
@RequestParam(value = "pageSize",defaultValue = "5",required = false)int pageSize){
ServerResponse serverResponse = positionService.findByKeyWord(keyWord,pageIndex,pageSize,flag);
return ServerResponse.buildSuccessData(serverResponse.getData());
}
//申请职位
@PostMapping("/apply")
@ResponseBody
public ServerResponse apply(HttpSession session,int pId,int resumeId){
String username =(String) session.getAttribute("username");
if (StringUtils.isEmpty(username)){
return ServerResponse.buildErrorMsg("请登录");
}
User user = userService.findByUsername(username);
return positionService.apply(user.getId(),pId,resumeId);
}
//收藏职位
@PostMapping("/collect")
@ResponseBody
public ServerResponse collect(HttpSession session,int pId){
String username =(String) session.getAttribute("username");
if (StringUtils.isEmpty(username)){
return ServerResponse.buildErrorMsg("请登录");
}
User user = userService.findByUsername(username);
return positionService.collect(user.getId(),pId,flag);
}
/*----------------------------职位管理-------------------------------------*/
@RequiresRoles("admin")
@GetMapping("/manager")
public String show(Model model){
ServerResponse serverResponse = positionService.findAll(1,5);
model.addAttribute("position",serverResponse.getData());
return "manage/position";
}
@RequiresRoles("admin")
@GetMapping("/manager/findByPage")
@ResponseBody
public ServerResponse findByPage(@RequestParam(value = "condition",required = false)String condition,
@RequestParam(value = "pageIndex",defaultValue = "1",required = false)int pageIndex,
@RequestParam(value = "pageSize",defaultValue = "5",required = false)int pageSize){
if (StringUtils.isEmpty(condition)){
condition = null;
}
//0代表无限制
return positionService.findByKeyWord(condition,pageIndex,pageSize,0);
}
//管理员的权限
@RequiresRoles("admin")
@PostMapping("/admin/add")
@ResponseBody
public ServerResponse add(Positions positions,HttpSession session){
String username =(String) session.getAttribute("username");
if (StringUtils.isEmpty(username)){
return ServerResponse.buildErrorMsg("请登录");
}
return positionService.insert(positions);
}
@GetMapping("/admin/getById/{id}")
@ResponseBody
@RequiresRoles("admin")
public ServerResponse findById(@PathVariable int id,HttpSession session){
String username =(String) session.getAttribute("username");
if (StringUtils.isEmpty(username)){
return ServerResponse.buildErrorMsg("请登录");
}
return positionService.findById(id);
}
//更新
@PostMapping("/admin/update")
@ResponseBody
@RequiresRoles("admin")
public ServerResponse update(Positions positions,HttpSession session){
String username =(String) session.getAttribute("username");
if (StringUtils.isEmpty(username)){
return ServerResponse.buildErrorMsg("请登录");
}
return positionService.update(positions);
}
//删除
@RequiresRoles("admin")
@DeleteMapping("/admin/delete/{id}")
@ResponseBody
public ServerResponse delete(@PathVariable int id,HttpSession session){
String username =(String) session.getAttribute("username");
if (StringUtils.isEmpty(username)){
return ServerResponse.buildErrorMsg("请登录");
}
return positionService.deleteById(id);
}
@GetMapping("/user/apply/findByPage")
@ResponseBody
public ServerResponse findByPageOne(
@RequestParam(value = "pageIndex", defaultValue = "1", required = false) int pageIndex,
@RequestParam(value = "pageSize", defaultValue = "5", required = false) int pageSize,HttpSession session) {
String username =(String) session.getAttribute("username");
if (StringUtils.isEmpty(username)){
return ServerResponse.buildErrorMsg("请登录");
}
User user = userService.findByUsername(username);
return positionService.findAllApply(pageIndex,pageSize,user.getId(),null);
}
}
岗位工作管理控制层:
@Controller
@RequestMapping("/job")
public class JobController {
@Autowired
private JobMapper jobMapper;
@Autowired
private JobService jobService;
@RequiresRoles("admin")
@PostMapping("/add")
@ResponseBody
public ServerResponse add(JobDTO dto) {
try {
dto.setCreateTime(new Date());
jobMapper.insertSelective(dto);
} catch (Exception e) {
return ServerResponse.buildErrorMsg("添加失败");
}
return ServerResponse.buildSuccessMsg("添加成功");
}
@RequiresRoles("admin")
@DeleteMapping("/delete/{id}")
@ResponseBody
public ServerResponse delete(@PathVariable("id") Integer id) {
try {
jobMapper.deleteByPrimaryKey(id);
} catch (Exception e) {
return ServerResponse.buildErrorMsg("删除失败");
}
return ServerResponse.buildSuccessMsg("删除成功");
}
@RequiresRoles("admin")
@PostMapping("/update")
@ResponseBody
public ServerResponse update(JobDTO dto) {
try {
jobMapper.updateByPrimaryKeySelective(dto);
} catch (Exception e) {
return ServerResponse.buildErrorMsg("修改失败");
}
return ServerResponse.buildSuccessMsg("修改成功");
}
@GetMapping("/getById/{id}")
@ResponseBody
@RequiresRoles("admin")
public ServerResponse findById(@PathVariable("id") String id, HttpSession session){
String username =(String) session.getAttribute("username");
if (StringUtils.isEmpty(username)){
return ServerResponse.buildErrorMsg("请登录");
}
return ServerResponse.buildSuccessData(jobMapper.selectByPrimaryKey(id));
}
@RequiresRoles("admin")
@GetMapping("/manager")
public String show(Model model) {
model.addAttribute("job", jobService.selectBySearch("", 1, 5));
return "manage/job";
}
@GetMapping("/manager/findByPage")
@ResponseBody
public ServerResponse findByPage(@RequestParam(value = "condition", required = false) String condition,
@RequestParam(value = "pageIndex", defaultValue = "1", required = false) int pageIndex,
@RequestParam(value = "pageSize", defaultValue = "5", required = false) int pageSize) {
if (StringUtils.isEmpty(condition)) {
condition = null;
}
//0代表无限制
return ServerResponse.buildSuccessData(jobService.selectBySearch(condition, pageIndex, pageSize));
}
}
源码获取:俺的博客首页 "资源" 里下载!