package com.baoge.controller;
import cn.hutool.core.util.IdUtil;
import com.baoge.entity.CardImage;
import com.baoge.entity.Job;
import com.baoge.entity.Resume;
import com.baoge.entity.User;
import com.baoge.queryvo.Application;
import com.baoge.queryvo.ApplicationAndResume;
import com.baoge.service.*;
import com.baoge.utils.MsgResult;
import com.baoge.utils.UserUtils;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.system.ApplicationHome;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpSession;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/dashboard")
public class DashboardController {
@Autowired
DashboardService dashboardService;
@Autowired
UserService userService;
@Autowired
JobService jobService;
@Autowired
ResumeService resumeService;
@Autowired
CardImageService cardImageService;
@Autowired
ApplicationService applicationService;
@RequestMapping("/personal")
public String personal() {
return "front/personal";
}
@RequestMapping("/personal/allApplication")
public String allApplication(@RequestParam("id") Integer id, Model model) {
model.addAttribute("id", id);
return "front/allApplication";
}
@PostMapping("/personal/allApplicationAct/{id}")
@ResponseBody
public MsgResult allApplicationAct(@PathVariable(value = "id") Integer id, Model model, int page, int limit) {
PageHelper.startPage(page, limit);
List<Application> applications = dashboardService.getAllApplication(id);
PageInfo<Application> info = new PageInfo<>(applications);
return new MsgResult(0, "", applications, info.getTotal());
}
@RequestMapping("/personal/passApplication")
public String passApplication(@RequestParam("id") Integer id, Model model) {
model.addAttribute("id", id);
return "front/passApplication";
}
@PostMapping("/personal/passApplicationAct/{id}")
@ResponseBody
public MsgResult passApplicationAct(@PathVariable(value = "id") Integer id, Model model, int page, int limit) {
PageHelper.startPage(page, limit);
List<Application> applications = dashboardService.getPassApplication(id);
PageInfo<Application> info = new PageInfo<>(applications);
return new MsgResult(0, "", applications, info.getTotal());
}
@RequestMapping("/personal/checkingApplication")
public String checkingApplication(@RequestParam("id") Integer id, Model model) {
model.addAttribute("id", id);
return "front/checkingApplication";
}
@PostMapping("/personal/checkingApplicationAct/{id}")
@ResponseBody
public MsgResult checkingApplication(@PathVariable(value = "id") Integer id, Model model, int page, int limit) {
PageHelper.startPage(page, limit);
List<Application> applications = dashboardService.getCheckingApplication(id);
PageInfo<Application> info = new PageInfo<>(applications);
return new MsgResult(0, "", applications, info.getTotal());
}
@RequestMapping("/personal/nopassApplication")
public String nopassApplication(@RequestParam("id") Integer id, Model model) {
model.addAttribute("id", id);
return "front/nopassApplication";
}
@PostMapping("/personal/nopassApplicationAct/{id}")
@ResponseBody
public MsgResult nopassApplicationAct(@PathVariable(value = "id") Integer id, Model model, int page, int limit) {
PageHelper.startPage(page, limit);
List<Application> applications = dashboardService.getnoPassApplication(id);
PageInfo<Application> info = new PageInfo<>(applications);
return new MsgResult(0, "", applications, info.getTotal());
}
@RequestMapping("/personal/editpassword")
public String editpassword(@RequestParam("id") Integer id, Model model) {
model.addAttribute("id", id);
return "front/editpassword";
}
@PostMapping("/personal/editpasswordAct/{id}")
@ResponseBody
public MsgResult editpasswordAct(@PathVariable(value = "id") Integer id, String oldpassword, String password) {
User user = userService.checkUserPasswordById(oldpassword, id);
if (user != null) {
int i = userService.editUserpassword(password, id);
return MsgResult.build(0, "修改成功");
} else {
return MsgResult.build(1, "初始密码错误");
}
}
@RequestMapping("/personal/editUserinfo")
public String editUserinfo(@RequestParam("id") Integer id, Model model) {
User user = userService.getUserById(id);
model.addAttribute("user", user);
return "front/editUserinfo";
}
@PostMapping("/personal/editUserinfoAct")
@ResponseBody
public MsgResult editUserinfoAct(User user) {
user.setStatus(null);
/*System.out.println(user);*/
try {
Integer retNum = userService.editUser(user);
if (retNum == 1) {
return MsgResult.build(1, "修改成功");
} else {
return MsgResult.build(0, "修改失败,请重新提交");
}
} catch (Exception e) {
e.printStackTrace();
return MsgResult.build(0, "修改失败,请重新提交");
}
}
@RequestMapping("/personal/allJob")
public String allJob(@RequestParam("id") Integer id, Model model) {
model.addAttribute("id", id);
return "front/allJob";
}
@PostMapping("/personal/allJobAct/{id}")
@ResponseBody
public MsgResult allJobAct(@PathVariable(value = "id") Integer userid, Model model, int page, int limit) {
PageHelper.startPage(page, limit);
List<Job> jobs = jobService.getallJob(userid);
PageInfo<Job> info = new PageInfo<>(jobs);
return new MsgResult(0, "", jobs, info.getTotal());
}
@RequestMapping("/personal/passJob")
public String passallJob(@RequestParam("id") Integer id, Model model) {
model.addAttribute("id", id);
return "front/passJob";
}
@PostMapping("/personal/passJobAct/{id}")
@ResponseBody
public MsgResult passJobAct(@PathVariable(value = "id") Integer userid, Model model, int page, int limit) {
PageHelper.startPage(page, limit);
List<Job> jobs = jobService.getJobByUserAndstatus(userid, 0);
PageInfo<Job> info = new PageInfo<>(jobs);
return new MsgResult(0, "", jobs, info.getTotal());
}
@RequestMapping("/personal/checkingJob")
public String checkingJob(@RequestParam("id") Integer id, Model model) {
model.addAttribute("id", id);
return "front/checkingJob";
}
@PostMapping("/personal/checkingJobAct/{id}")
@ResponseBody
public MsgResult checkingJobAct(@PathVariable(value = "id") Integer userid, Model model, int page, int limit) {
PageHelper.startPage(page, limit);
List<Job> jobs = jobService.getJobByUserAndstatus(userid, 1);
PageInfo<Job> info = new PageInfo<>(jobs);
return new MsgResult(0, "", jobs, info.getTotal());
}
@RequestMapping("/personal/nopassJob")
public String nopassJob(@RequestParam("id") Integer id, Model model) {
model.addAttribute("id", id);
return "front/nopassJob";
}
@PostMapping("/personal/nopassJobAct/{id}")
@ResponseBody
public MsgResult nopassJobAct(@PathVariable(value = "id") Integer userid, Model model, int page, int limit) {
PageHelper.startPage(page, limit);
List<Job> jobs = jobService.getJobByUserAndstatus(userid, 2);
PageInfo<Job> info = new PageInfo<>(jobs);
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
毕设-大学生兼职系统.zip (353个子文件)
bootstrap.min.css 118KB
layui.css 71KB
font-awesome.css 37KB
font-awesome.min.css 32KB
layuimini.css 20KB
wangEditor.css 17KB
wangEditor.min.css 15KB
layer.css 14KB
treeTable.css 11KB
layui.mobile.css 10KB
zyupload-1.0.0.min.css 9KB
laydate.css 7KB
media.css 7KB
zdialog.css 5KB
dtree.css 5KB
dtreefont.css 4KB
default.css 4KB
navigationbar.css 4KB
index.css 4KB
ptjob.css 2KB
abouts.css 1KB
public.css 1KB
step.css 1KB
code.css 1KB
personal.css 874B
news.css 856B
start.css 558B
pijob.css 308B
fontawesome-webfont.eot 162KB
iconfont.eot 41KB
glyphicons-halflings-regular.eot 20KB
dtreefont.eot 19KB
59.gif 10KB
22.gif 10KB
24.gif 8KB
13.gif 7KB
16.gif 7KB
39.gif 6KB
64.gif 6KB
63.gif 6KB
50.gif 6KB
loading-0.gif 6KB
4.gif 6KB
1.gif 5KB
42.gif 5KB
71.gif 5KB
21.gif 5KB
20.gif 5KB
29.gif 5KB
70.gif 4KB
5.gif 4KB
17.gif 4KB
27.gif 4KB
9.gif 4KB
44.gif 4KB
11.gif 4KB
8.gif 4KB
3.gif 4KB
23.gif 4KB
34.gif 4KB
41.gif 4KB
38.gif 4KB
65.gif 3KB
32.gif 3KB
45.gif 3KB
7.gif 3KB
12.gif 3KB
26.gif 3KB
60.gif 3KB
2.gif 3KB
40.gif 3KB
25.gif 3KB
19.gif 3KB
66.gif 3KB
18.gif 3KB
46.gif 3KB
10.gif 3KB
28.gif 3KB
51.gif 3KB
57.gif 3KB
67.gif 3KB
0.gif 3KB
48.gif 3KB
43.gif 3KB
30.gif 2KB
61.gif 2KB
33.gif 2KB
69.gif 2KB
14.gif 2KB
47.gif 2KB
36.gif 2KB
49.gif 2KB
58.gif 2KB
6.gif 2KB
54.gif 2KB
53.gif 2KB
56.gif 2KB
62.gif 2KB
31.gif 2KB
55.gif 2KB
共 353 条
- 1
- 2
- 3
- 4
资源评论
马coder
- 粉丝: 1206
- 资源: 6602
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于C和C++的二维绘制工具设计源码 - DrawPro
- Object.defineProperty 的 IE 补丁object-defineproperty-ie-master.zip
- 整卷预览.mhtml
- MySQL是一种广泛使用的开源关系型数据库管理系统,它提供了丰富的SQL语句用于数据库的创建、查询、更新和管理 以下是一些常见的
- MySQL是一种广泛使用的开源关系型数据库管理系统,它提供了丰富的SQL语句用于数据库的创建、查询、更新和管理 以下是一些常见
- MySQL是一种广泛使用的开源关系型数据库管理系统,它提供了丰富的SQL语句用于数据库的创建、查询、更新和管理 以下是一些常见的
- 基于Javascript的结婚请帖设计源码 - Invitation
- mysql语句大全及用法
- mysql语句大全及用法
- mysql语句大全及用法
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功