package com.stone.controller;
import cn.hutool.core.util.StrUtil;
import com.stone.bean.*;
import com.stone.exception.CustomException;
import com.stone.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.text.SimpleDateFormat;
import java.util.*;
@SessionAttributes(types={Resume.class,Company.class},value={"email","type"})
@Controller
@RequestMapping("/")
public class CompanyController {
@Autowired
private CompanyService companyService;
@RequestMapping(value="/completeCom")
@ResponseBody
public Map<String,Object> CompleteCom(Company company,ModelMap modelMap) throws Exception {
Map<String,Object> map = new HashMap<String,Object>();
try{
Boolean isSuccess = companyService.CompleteCo(company);
if(isSuccess){
map.put("tip","success");
modelMap.addAttribute("type","company");
}else {
map.put("tip","error");
}
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
@RequestMapping(value = "/display")
@ResponseBody
public Map<String,Object> Display(String email) throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
Company company = companyService.Display(email);
char c = ',';
String s = company.getSelect_industry_hidden().substring(1,company.getSelect_industry_hidden().length());
String s1 = company.getSelect_scale_hidden().substring(1,company.getSelect_scale_hidden().length());
System.out.println(s);
System.out.println(s1);
company.setSelect_industry_hidden(s);
company.setSelect_scale_hidden(s1);
List<Map<String,Object>> list = companyService.showAp(email);
for(Map<String,Object> m:list){
if(StringUtils.isEmpty(m.get("comGrade"))){
}else{
System.out.println(m.get("comGrade"));
}
}
map.put("company",company);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//编辑公司介绍
@RequestMapping(value = "/updateTem")
@ResponseBody
public Map<String,Object> UpdateTem(Company company) throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
Company company1 = companyService.UpdateTem(company);
map.put("company",company1);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//编辑公司介绍
@RequestMapping(value = "/updateMe")
@ResponseBody
public Map<String,Object> UpdateMe(Company company) throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
Company company1 = companyService.UpdateMe(company);
map.put("company",company1);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//编辑公司基本信息
@RequestMapping(value = "/updateUrl")
@ResponseBody
public Map<String,Object> UpdateUrl(Company company) throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
Company company1 = companyService.UpdateUrl(company);
map.put("company",company1);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//编辑公司名称
@RequestMapping(value = "/updateName")
@ResponseBody
public Map<String,Object> UpdateName(Company company) throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
System.out.println(company.getEmail());
Company company1 = companyService.UpdateName(company);
map.put("company",company1);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//判断公司名称是否已存在
@RequestMapping(value = "/isName")
@ResponseBody
public Map<String,Object> isName(String name) throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
Boolean isSuccess = companyService.isName(name);
map.put("tip",isSuccess);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//判断兼职名称是否已存在
@RequestMapping(value = "/isJobName")
@ResponseBody
public Map<String,Object> isJobName(String jobName,String email) throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
Boolean isSuccess = companyService.isJobName(jobName,email);
map.put("tip",isSuccess);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//完善兼职信息
@RequestMapping(value = "/comJob")
@ResponseBody
public Map<String,Object> comJob(Resume resume) throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
Boolean result = false;
if(companyService.isJob(resume)){
result = companyService.editJob(resume);
}else {
result = companyService.comJob(resume);
}
map.put("tip",result);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//通过email获取兼职信息
@RequestMapping(value = "/disResume")
@ResponseBody
public Map<String,Object> disResume(String email) throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
List<Resume> reList = companyService.disResume(email);
map.put("reList",reList);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//获取所以有效兼职 按点击量排序
@RequestMapping(value = "/allResume")
@ResponseBody
public Map<String,Object> allResume() throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
List<Resume> reList = companyService.allResumeByHits();
map.put("list",reList);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//通过名称获取兼职
@RequestMapping(value = "/findResumeByName")
@ResponseBody
public Map<String,Object> findResume(String jobName) throws Exception {
Map<String ,Object> map = new HashMap<String,Object>();
try{
List<Resume> reList = companyService.findResume(jobName);
map.put("list",reList);
}catch (Exception e){
throw new CustomException("未知错误");
}
return map;
}
//通过email或者name获取兼职信息
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于ssm+mysql+jsp大学生兼职平台(高分毕设)已获导师指导并通过的95分的高分期末大作业项目,可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。 该系统功能完善、界面美观、操作简单、功能齐全、管理便捷,具有很高的实际应用价值。 系统主要功能: 学生:主页、我的简历、我的报名 企业:企业简介、发布兼职 管理员:用户管理、申述管理、兼职管理、留言管理 详情:https://blog.csdn.net/qq_33037637/article/details/124947317
资源推荐
资源详情
资源评论
收起资源包目录
基于ssm+mysql+jsp大学生兼职平台(高分毕设) (1294个子文件)
style.css.bak 169KB
style.css.bak 169KB
CompanyController.class 21KB
CompanyController.class 21KB
CompanyController1.class 16KB
CompanyController.class 16KB
UserController.class 12KB
UserController.class 12KB
UserController1.class 12KB
UserController.class 12KB
CompanyServiceImp.class 10KB
CompanyServiceImp.class 10KB
CompanyServiceImp.class 8KB
CompanyServiceImp1.class 8KB
StudentController.class 8KB
StudentController.class 8KB
StudentController.class 8KB
StudentController1.class 8KB
StudentServiceImp.class 7KB
StudentServiceImp.class 7KB
UserServiceImp.class 6KB
UserServiceImp1.class 6KB
UserServiceImp.class 6KB
UserServiceImp.class 6KB
StudentServiceImp1.class 6KB
StudentServiceImp.class 6KB
Student1.class 3KB
Student.class 3KB
Student.class 3KB
Student.class 3KB
Company1.class 3KB
Company.class 3KB
Company.class 3KB
Company.class 3KB
Resume.class 3KB
Resume.class 3KB
Record1.class 3KB
Record.class 3KB
Apply.class 3KB
Apply.class 3KB
CompanyService.class 3KB
CompanyService.class 3KB
LoginInterceptor.class 3KB
LoginInterceptor1.class 3KB
LoginInterceptor.class 3KB
LoginInterceptor.class 3KB
CompanyDao.class 2KB
CompanyDao.class 2KB
Resume1.class 2KB
Resume.class 2KB
Allege.class 2KB
Allege1.class 2KB
Allege.class 2KB
Allege.class 2KB
LeaveMessge.class 2KB
LeaveMessge.class 2KB
CompanyService.class 2KB
CompanyService1.class 2KB
CompanyDao1.class 2KB
CompanyDao.class 2KB
UserService1.class 1KB
UserService.class 1KB
UserService.class 1KB
UserService.class 1KB
CustomExceptionResolver1.class 1KB
CustomExceptionResolver.class 1KB
CustomExceptionResolver.class 1KB
CustomExceptionResolver.class 1KB
User.class 1KB
User1.class 1KB
User.class 1KB
User.class 1KB
UserDao.class 1KB
UserDao1.class 1KB
UserDao.class 1KB
UserDao.class 1KB
StudentService.class 1KB
StudentService.class 1KB
StudentDao.class 997B
StudentDao.class 997B
StudentService.class 971B
StudentService1.class 971B
StudentDao1.class 943B
StudentDao.class 943B
CustomException.class 590B
CustomException1.class 590B
CustomException.class 590B
CustomException.class 590B
style.css 169KB
style.css 169KB
bootstrap.css 149KB
bootstrap.css 149KB
bootstrap.min.css 118KB
bootstrap.min.css 118KB
bootstrap.min.css 118KB
bootstrap.min.css 118KB
style20160105.css 59KB
style20160105.css 59KB
layui.css 50KB
layui.css 50KB
共 1294 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13
资源评论
小码叔
- 粉丝: 4262
- 资源: 1207
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功