作者主页:夜未央5788
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
基于springboot Vue毕业生信息招聘平台
角色:管理员、企业、毕业生三种角色
毕业生:用户系统,在系统首页可以查看首页,空中宣讲会,招聘岗位查看,求职信息查看,论坛信息查看,试卷列表,招聘咨讯、个人中心等内容
企业:企业登录系统后,可以对首页,个人中心,空中宣讲会管理、招聘岗位管理、信息咨询管理、岗位应聘管理、线上面试管理、面试回复管理、试卷管理、试题管理、考试管理等
管理员:管理员登录进入毕业生信息招聘平台可以查看首页、个人中心、企业管理、空中宣讲会管理、招聘岗位管理、毕业生管理、个人简历管理、求职信息管理、信息咨询管理、岗位应聘管理、线上面试管理、面试回复管理、试卷管理、试题管理、管理员管理、论坛管理、系统管理、考试管理等内容
使用人群:
正在做毕设的学生,或者需要项目实战练习的Java学习者
由于本程序规模不大,可供课程设计,毕业设计学习演示之用
更多项目源码,请到“源码空间站”,地址:http://www.shuyue.fun/
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 5.7/8.0版本均可;
5.是否Maven项目:是;
技术栈
后端:SpringBoot+Mybaits
前端:Vue +ElementUI +Layui +HTML+CSS+JS
使用说明
项目运行:
1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;
前台地址:http://localhost:8080/springbootan251/front/index.html
后台地址:http://localhost:8080/springbootan251/admin/dist/index.html#/login
管理员: abo/abo
企业:000/000
毕业生:001/001
运行截图
架构图及论文
前台界面
后台界面
相关代码
BiyeshengController
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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 com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.BiyeshengEntity;
import com.entity.view.BiyeshengView;
import com.service.BiyeshengService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 毕业生
* 后端接口
* @author
* @email
* @date 2021-01-04 10:02:53
*/
@RestController
@RequestMapping("/biyesheng")
public class BiyeshengController {
@Autowired
private BiyeshengService biyeshengService;
@Autowired
private TokenService tokenService;
/**
* 登录
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
BiyeshengEntity user = biyeshengService.selectOne(new EntityWrapper<BiyeshengEntity>().eq("yonghuming", username));
if(user==null || !user.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(), username,"biyesheng", "毕业生" );
return R.ok().put("token", token);
}
/**
* 注册
*/
@IgnoreAuth
@RequestMapping("/register")
public R register(@RequestBody BiyeshengEntity biyesheng){
//ValidatorUtils.validateEntity(biyesheng);
BiyeshengEntity user = biyeshengService.selectOne(new EntityWrapper<BiyeshengEntity>().eq("yonghuming", biyesheng.getYonghuming()));
if(user!=null) {
return R.error("注册用户已存在");
}
Long uId = new Date().getTime();
biyesheng.setId(uId);
biyeshengService.insert(biyesheng);
return R.ok();
}
/**
* 退出
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* 获取用户的session用户信息
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
BiyeshengEntity user = biyeshengService.selectById(id);
return R.ok().put("data", user);
}
/**
* 密码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
BiyeshengEntity user = biyeshengService.selectOne(new EntityWrapper<BiyeshengEntity>().eq("yonghuming", username));
if(user==null) {
return R.error("账号不存在");
}
user.setMima("123456");
biyeshengService.updateById(user);
return R.ok("密码已重置为:123456");
}
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,BiyeshengEntity biyesheng, HttpServletRequest request){
EntityWrapper<BiyeshengEntity> ew = new EntityWrapper<BiyeshengEntity>();
PageUtils page = biyeshengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, biyesheng), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,BiyeshengEntity biyesheng, HttpServletRequest request){
EntityWrapper<BiyeshengEntity> ew = new EntityWrapper<BiyeshengEntity>();
PageUtils page = biyeshengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, biyesheng), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( BiyeshengEntity biyesheng){
EntityWrapper<BiyeshengEntity> ew = new EntityWrapper<BiyeshengEntity>();
ew.allEq(MPUtil.allEQMapPre( biyesheng, "biyesheng"));
return R.ok().put("data", biyeshengService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(BiyeshengEntity biyesheng){
EntityWrapper< BiyeshengEntity> ew = new EntityWrapper< BiyeshengEntity>();
ew.allEq(MPUtil.allEQMapPre( biyesheng, "biyesheng"));
BiyeshengView biyeshengView = biyeshengService.selectView(ew);
return R.ok("查询毕业生成功").put("data", biyeshengView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
BiyeshengEntity biyesheng = biyeshengService.selectById(id);
return R.ok().put("data", biyesheng);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") String id){
BiyeshengEntity biyesheng = biyeshengService.selectById(id);
return R.ok().put("data", biyesheng);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody BiyeshengEntity biyesheng, HttpServletRequest request){
biyesheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(biyesheng);
BiyeshengEntity user = biyeshengService.selectOne(new EntityWrapper<BiyeshengEntity>().eq("yonghuming", biyesheng.getYonghuming()));
if(user!=null) {
return R.error("用户已存在");
}
biyesheng.setId(new Date().getTime());
biyeshengService.insert(biyesheng);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody BiyeshengEntity biyesheng, HttpServletRequest request){
biyesheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(biyesheng);
BiyeshengEntity user = biyeshengService.selectOne(new EntityWrapper<BiyeshengEntity>().eq("yonghuming", biyesheng.getYonghuming()));
if(user!=null) {
return R.error("用户已存在");
}
biyesheng.setId(new Date().getTime());
biyeshengService.insert(biyesheng);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody BiyeshengEntity biyesheng, HttpServletRequest request){
//ValidatorUtils.validateEntity(biyesheng);
biyeshengService.updateById(biyesheng);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
biyeshengService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<BiyeshengEntity> wrapper = new EntityWrapper<BiyeshengEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = biyeshengService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
ConfigController
package com.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
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.RestController;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.service.ConfigService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;
/**
* 登录相关
*/
@RequestMapping("config")
@RestController
public class ConfigController{
@Autowired
private ConfigService configService;
/**
* 列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ConfigEntity config){
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
PageUtils page = configService.queryPage(params);
return R.ok().put("data", page);
}
/**
* 列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ConfigEntity config){
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
PageUtils page = configService.queryPage(params);
return R.ok().put("data", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
ConfigEntity config = configService.selectById(id);
return R.ok().put("data", config);
}
/**
* 详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") String id){
ConfigEntity config = configService.selectById(id);
return R.ok().put("data", config);
}
/**
* 根据name获取信息
*/
@RequestMapping("/info")
public R infoByName(@RequestParam String name){
ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
return R.ok().put("data", config);
}
/**
* 保存
*/
@PostMapping("/save")
public R save(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);
configService.insert(config);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);
configService.updateById(config);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
configService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}
如果也想学习本系统,下面领取。关注并回复:171springboot