源码获取:俺的博客首页 "资源" 里下载!
本项目分为管理员、求职者、企业用户三种角色,
管理员角色包含以下功能:
招聘信息管理,求职信息管理,工作地点管理,求职技巧管理,职场咨询管理,系统简介管理,友情链接管理,关于我们管理,留言板管理和回复,求职者管理,企业信息管理,管理员信息管理,修改个人信息和密码等功能。
求职者角色包含以下功能:
求职者首页,求职者登录注册,招聘信息查看,企业资料查看,企业推荐查看,查看求职技巧,系统简介,留言板查看,个人简历管理,个人基本信息管理,我的工作申请,企业和工作推荐查看,企业来信查看,查看收藏的职位等功能。
企业用户角色包含以下功能:
企业登录注册,招聘信息管理,求职信息管理,人才推荐管理,企业详情管理等功能。
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.数据库:MySql 5.7版本;
6.是否Maven项目:否;
1. 后端:Servlet
2. 前端:JSP+JavaScript+JQuery+CSS+Ajax
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中dbconnection.properties配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入localhost:8080/jsp_qzzp_sys/ 登录 注:Tomcat中配置的路径必须为/jsp_qzzp_sys
管理员账号/密码:admin/admin
求职者账号/密码:qiuzhi/123456
企业账号/密码:qiye/123456
@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 pClassify = Lists.newArrayList();
List workSite = Lists.newArrayList();
condition=condition.replaceAll("\\u00A0"," ");
if (StringUtils.isNotEmpty(condition)){
String[] arr = condition.trim().split(" ");
for (int i = 0; i
@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));
}
}
源码获取:俺的博客首页 "资源" 里下载!