基于javaweb的SpringBoot+MyBatis招聘平台(平台、企业、用户)(java+springboot+jsp+mysql+maven)

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

平台:管理企业、用户

企业:发部职位,查看投递

用户:查找职位,收藏职位,投递职位

360123222502

用户

370123222502

380123222502

390123222502

410123222502

420123222502

企业

430123222502

440123222502

450123222502

460123222502

管理员

470123222502

480123222502

490123222502

500123222502

520123222502

技术框架

JSP CSS JavaScript jQuery SpringBoot SpringMVC MyBatis

基于javaweb的SpringBoot+MyBatis招聘平台(平台、企业、用户)(java+springboot+jsp+mysql+maven)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// 企业注册
@RequestMapping("registCom")
@ResponseBody
public Message registCom(Company company) {
Message msg=new Message();
int result = companyService.findCompanyByName(company.getCompanyLoginName());//获得公司登录名去数据库中查询
if(result==1){//公司登录名已经存在
msg.setStr("公司登录名已经存在");
return msg;
}else if(result==0){//公司登录名也没被注册
int result_ = companyService.findByCompanyName(company.getCompanyName()); //判断公司名称是否唯一
if(result_==1){
msg.setStr("公司名已经存在");
return msg;
}else{
//公司名字也没被注册
companyService.save(company);//插入具体数据
msg.setStr("success");
return msg;
}
}
return msg;
}
/**
* 查询一个企业详细信息
* */
@RequestMapping("show")
public String show(Integer cid,String jobName,String jobAddress,String releaseTime,Double jobSalary,String companyName,Model model){
Company company = companyService.findCompanyById(cid);
model.addAttribute("jobName", jobName);
model.addAttribute("jobAddress", jobAddress);
model.addAttribute("releaseTime", releaseTime);
model.addAttribute("jobSalary",jobSalary);
model.addAttribute("companyName",companyName);
model.addAttribute("company", company);
return "/job/showOneCompany";
}
/**
* 企业登录
* */
@RequestMapping("accessComLogin")
@ResponseBody
public Message accessComLogin(HttpServletRequest request, String companyLoginName, String verificationCode,String companyPwd,Model model) {
Message msg=new Message();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38




@Controller
@RequestMapping("/com")
public class CompanyController {

@Autowired
public ICompanyService companyService;
@Autowired
private IJobService iJobService;
// 查询所有用户
@RequestMapping("findAllCompany")
public String findAllCompany(Model model) {
List<Company> companyList = companyService.findAll();
model.addAttribute("companyList", companyList);
return "/company/listAllCompany";
}

// 跳转到修改页面
@RequestMapping("editCompany")
public String editCompany(Integer cid, Model model) {
// 根据id查询
Company company = companyService.findCompanyById(cid);
// 页面回显
model.addAttribute("company", company);
return "/company/editCompany";
}

// 根据ID进行删除
@RequestMapping("deleteById")
public String deleteById(Integer cid) {
companyService.deleteById(cid);
// 重定向到列表界面
return "redirect:findAllCompany";
}
@RequestMapping("editCompanySubmit")
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
				job_.setCid(String.valueOf(cid));
job_.setJobAddress(jobAddress);
job_.setJobName(jobName);
job_.setJobSalary(jobSalary);
job_.setReleaseTime(new Date());
int result = iJobService.insertJob(job_);
if(result==1){
msg.setStr("success");
return msg;
}else{
msg.setStr("插入职位失败");
return msg;
}
}else{
//不可以
msg.setStr("新增的职位名称不可以重复");
return msg;
}
}else{
msg.setStr("fail");
return msg;
}
}
/**
* 跳转至企业登录页面
*/
@RequestMapping("login")
public String login() {
return "/company/login";
}
/**
* 跳转至企业注册页面
*/
@RequestMapping("regist")
public String regist() {
return "/regist/registCom";
}
/**
* 跳转至企业首页
*/
@RequestMapping("index")
public String index() {
return "/company/index";
}
/**
* 退出登录
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@RequestMapping("top")
public String toTop() {
return "/company/top";
}
/**
* 跳转到left.jsp
*/
@RequestMapping("left")
public String toLeft() {
return "/company/left";
}
/**
* 跳转到body.jsp
*/
@RequestMapping("body")
public String toBody() {
return "/company/body";
}


@RequestMapping("exportSheet")
public void exportSheet(HttpServletResponse response, HttpSession session) {
List<Company> list = companyService.findAll();

Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams("公司信息", "company"),
Company.class, list);


String encode = null;
try {
encode = URLEncoder.encode("公司信息.xls", "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
response.addHeader("Content-Disposition", "attachment;filename=" + encode);// 设置文件名


ServletOutputStream os = null;
try {
os = response.getOutputStream();
} catch (IOException e) {
e.printStackTrace();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
	/**
* 跳转到主页
*/
@RequestMapping("index")
public String toIndex() {
return "/main/index";
}

/**
* 跳转到top.jsp
*/
@RequestMapping("top")
public String toTop() {
return "/main/top";
}

/**
* 跳转到left.jsp
*/
@RequestMapping("left")
public String toLeft() {
return "/main/left";
}
/**
* 跳转到body.jsp
*/
@RequestMapping("body")
public String toBody() {
return "/main/body";
}

/**
* 跳转到用户注册页面
*/
@RequestMapping("registUser")
public String toRegistUser() {
return "/regist/registUser";
}

/**
* 跳转到企业注册页面
*/
@RequestMapping("registCom")
public String toRegistCom() {
return "/regist/registCom";
}
}
package com.demo.controller;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36




@Controller
@RequestMapping("/com")
public class CompanyController {

@Autowired
public ICompanyService companyService;
@Autowired
private IJobService iJobService;
// 查询所有用户
@RequestMapping("findAllCompany")
public String findAllCompany(Model model) {
List<Company> companyList = companyService.findAll();
model.addAttribute("companyList", companyList);
return "/company/listAllCompany";
}

// 跳转到修改页面
@RequestMapping("editCompany")
public String editCompany(Integer cid, Model model) {
// 根据id查询
Company company = companyService.findCompanyById(cid);
// 页面回显
model.addAttribute("company", company);
return "/company/editCompany";
}

// 根据ID进行删除
@RequestMapping("deleteById")
public String deleteById(Integer cid) {
companyService.deleteById(cid);
// 重定向到列表界面
return "redirect:findAllCompany";


项目链接:
https://javayms.github.io?id=111521552802106ag
https://javayms.pages.dev?id=111521552802106ag