基于JSP的JSP+MYSQL人才招聘系統hrm系統是一個綜合的員工管理系統,系統首頁面左邊由導航樹構成,分為:部門管理、員工管理、招聘管理、教育訓練管理、薪資管理、以及系統設定子產品,
子產品功能主要包含CRUD操作,詳情檢視等操作。
背景管理具體描述如下:網站新聞資訊管理|--添加新聞資訊;|--修改新聞資訊;|--删除新聞資訊個人會員管理|--檢視個人會員|--删除個人會員企業會員管理|--檢視企業會員|--删除企業會員線上留言管理|--檢視線上留言|--删除線上留言
系統使用者管理
|--系統使用者的錄入,包括使用者名、密碼等資訊|--修改自己的密碼|--使用者資訊檢視|--登入日志檢視 招聘資訊管理求職資訊管理求職資訊稽核
個人會員
|--注冊個人使用者|--個人使用者修改自己的密碼|--個人使用者釋出自己的求職資訊|--個人使用者修改自己的求職資訊|--個人使用者上傳自己的照片|--發送求職申請和個人履歷|--接收用人機關的面試通知
企業會員|--注冊企業使用者|--企業使用者修改自己的密碼|--企業使用者釋出自己的招聘資訊|--企業使用者修改自己的招聘資訊|--企業使用者向求職者發送面試通知|--為所有求職人員設定人才庫資料庫(hibernate 的c3p0連接配接資料庫使用說明)

com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/hrm
root
123456
true
true
org.hibernate.dialect.MySQL5Dialect
org.springframework.orm.hibernate4.SpringSessionContext "
package com.csl.controller;
import com.alibaba.fastjson.JSON;
import com.csl.domain.*;
import com.csl.serviceImpl.GoodsServiceImpl;
import com.csl.serviceImpl.ImageServiceImpl;
import com.csl.serviceImpl.UserServiceImpl;
import com.google.gson.Gson;
import com.qiniu.common.QiniuException;
import com.qiniu.common.Zone;
import com.qiniu.http.Response;
import com.qiniu.storage.Configuration;
import com.qiniu.storage.UploadManager;
import com.qiniu.storage.model.DefaultPutRet;
import com.qiniu.util.Auth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.UUID;
@Controller
@RequestMapping(value = "/goods")
public class GoodsController {
@Autowired
private GoodsServiceImpl goodsService;
@Autowired
private UserServiceImpl userService;
@Autowired
private ImageServiceImpl imageService;
private String imageUrl = "";
@RequestMapping(value = "/goodsSpecific/{goodsID}&{userID}", method = RequestMethod.GET)
public ModelAndView goodsSpecific(@PathVariable("goodsID") String goodsID, @PathVariable String userID) {
GoodsDO goodsDO = this.goodsService.getByID(goodsID, userID);
UserDO userDO = this.userService.getOwner(goodsID);
ModelAndView modelAndView = new ModelAndView("GoodsSpecific");
modelAndView.addObject("goods", goodsDO);
modelAndView.addObject("user", userDO);
return modelAndView;
}
@RequestMapping(value = "/attentionGoods", method = RequestMethod.POST)
@ResponseBody
public int attentionGoods(String goodsID, String userID, boolean isAttention) {
try {
if (isAttention) {
this.goodsService.attentionGoods(userID, goodsID);
return 1;
} else {
this.goodsService.removeAttention(userID, goodsID);
return 2;
}
} catch (Exception exception) {
}
return -1;
}
@RequestMapping(value = "/getTop5", method = RequestMethod.GET)
@ResponseBody
public List<GoodsDO> getTop5(String userID) {
return this.goodsService.getTop5(userID);
}
@RequestMapping(value = "/viewCollection", method = RequestMethod.GET)
public ModelAndView viewCollection() {
return new ModelAndView("UserCollection");
}
@RequestMapping(value = "/getCollection")
@ResponseBody
public List<GoodsDO> getCollection(String userID) {
return this.goodsService.getGoodsByUserID(userID, ActionPage.attention);
}
@RequestMapping(value = "/viewRepository", method = RequestMethod.GET)
public ModelAndView viewRepository() {
return new ModelAndView("GoodsRepository");
}
@RequestMapping(value = "/getRepository", method = RequestMethod.GET)
@ResponseBody
public List<GoodsDO> getRepository(String userID) {
return this.goodsService.getGoodsByUserID(userID, ActionPage.own);
}
@RequestMapping(value = "/editGoods/{goodsID}", method = RequestMethod.GET)
public ModelAndView editGoods(@PathVariable String goodsID) {
GoodsDO goodsDO = this.goodsService.find(goodsID);
ModelAndView modelAndView = new ModelAndView("GoodsEdit");
modelAndView.addObject("goods", goodsDO);
modelAndView.addObject("pageType", "edit");
return modelAndView;
}
@RequestMapping(value = "/update", method = RequestMethod.GET)
@ResponseBody
public boolean update(String goodsJSON) {
GoodsDO goodsDO = JSON.parseObject(goodsJSON, GoodsDO.class);
if (goodsDO.getImageUrl() == "") {
goodsDO.setImageUrl(this.imageUrl);
}
return this.goodsService.update(goodsDO);
}
@RequestMapping(value = "/remove", method = RequestMethod.GET)
@ResponseBody
public boolean remove(String goodsID, int type) {
boolean result = true;
switch (type) {
case 1:
result = this.goodsService.remove(goodsID);
break;
case 2:
result = this.goodsService.removeSoldGoods(goodsID);
break;
default:
break;
}
return result;
}
@RequestMapping(value = "/createGoods", method = RequestMethod.GET)
public ModelAndView createGoods() {
GoodsDO goodsDO = new GoodsDO();
goodsDO.setID(UUID.randomUUID().toString());
ModelAndView modelAndView = new ModelAndView("GoodsEdit");
modelAndView.addObject("goods", goodsDO);
modelAndView.addObject("pageType", "create");
return modelAndView;
}
@RequestMapping(value = "/friendGoods/{twoID}", method = RequestMethod.GET)
public ModelAndView friendGoods(@PathVariable("twoID") String twoID) {
ModelAndView modelAndView = new ModelAndView("FriendGoods");
modelAndView.addObject("twoID", twoID);
return new ModelAndView("FriendGoods");
}
@RequestMapping(value = "/upImage", method = RequestMethod.POST)
@ResponseBody
public boolean upImage(@RequestParam("file") MultipartFile imageFile) {
try {
this.imageUrl = this.imageService.upImage(imageFile.getBytes());
} catch (Exception exception) {
}
return true;
}
@RequestMapping(value = "/addGoods", method = RequestMethod.GET)
@ResponseBody
public boolean addGoods(String goodsJSON, String userID) {
GoodsDO goodsDO = JSON.parseObject(goodsJSON, GoodsDO.class);
goodsDO.setImageUrl(this.imageUrl);
goodsDO.setStatus(GoodsStatus.unsold.name());
return this.goodsService.save(goodsDO, userID);
}
@RequestMapping(value = "/updateStatus", method = RequestMethod.GET)
@ResponseBody
public boolean updateStatus(String goodsID, String status) {
return this.goodsService.updateStatus(goodsID, GoodsStatus.valueOf(status));
}
@RequestMapping(value = "/search", method = RequestMethod.GET)
@ResponseBody
public List<GoodsDO> search(String userID, String text) {
return null;
}
}
package com.csl.controller;
import com.csl.domain.FinalValue;
import com.csl.domain.UserDO;
import com.csl.domain.ValidateCodeMap;
import com.csl.serviceImpl.MailServiceImpl;
import com.csl.serviceImpl.UserServiceImpl;
import com.csl.utility.ValidateCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import java.awt.image.BufferedImage;
import java.util.*;
@Controller
@RequestMapping(value = "/user")
public class UserController {
@Autowired
private UserServiceImpl userService;
@Autowired
private MailServiceImpl mailService;
private String validateCode = "";
private ValidateCode validateCoder = ValidateCode.getInstance();
private int validateIndex = 0;
private ArrayList<ValidateCodeMap> validateMapList = new ArrayList<ValidateCodeMap>();
@RequestMapping(value = "/getUserByEmail", method = RequestMethod.GET)
@ResponseBody
public UserDO getUserByEmail(String email) {
return this.userService.getUserByEmail(email);
}
@RequestMapping(value = "/getUserByID", method = RequestMethod.GET)
@ResponseBody
public UserDO getUserByID(String ID) {
return this.userService.getUserByID(ID);
}
@RequestMapping(value = "/validateUser", method = RequestMethod.GET)
@ResponseBody
public boolean validateUser(String email, String password) {
return this.userService.isRightUser(email, password);
}
@RequestMapping(value = "/getValidateCode", method = RequestMethod.GET)
@ResponseBody
public String getValidateCode() {
String result = "";
if (this.validateMapList != null && this.validateMapList.size() == 0) {
this.validateMapList = this.validateCoder.getValidateMap();
}
int index = new Random().nextInt(this.validateMapList.size());
while (index == this.validateIndex) {
index = new Random().nextInt(this.validateMapList.size());
}
this.validateIndex = index;
result = FinalValue.filePath + this.validateMapList.get(index).getName() + ".PNG";
return result;
}
@RequestMapping(value = "/checkValidateCode", method = RequestMethod.GET)
@ResponseBody
public boolean checkValidateCode(String validateCode, int kind) {
boolean result = true;
switch (kind) {
case 1:
result = validateCode.equals(this.validateMapList.get(validateIndex).getResult());
;
break;
case 2:
result = this.validateCode != "" && this.validateCode.equals(validateCode);
break;
default:
break;
}
return result;
}
@RequestMapping(value = "/checkEmail", method = RequestMethod.GET)
@ResponseBody
public boolean checkEmail(String userEmail) {
return this.userService.checkEmail(userEmail);
}
@RequestMapping(value = "/checkName", method = RequestMethod.GET)
@ResponseBody
public boolean checkName(String userName) {
return this.userService.checkName(userName);
}
@RequestMapping(value = "/checkTelephone", method = RequestMethod.GET)
@ResponseBody
public boolean checkTelephone(String telephone) {
return this.userService.checkTelephone(telephone);
}
@RequestMapping(value = "/registerAccount", method = RequestMethod.POST)
@ResponseBody
public UserDO registerAccount(UserDO userDO) {
userDO.setID(UUID.randomUUID().toString());
try {
boolean result = this.userService.registerAccount(userDO);
if (result) {
return userDO;
}
} catch (Exception exception) {
}
return null;
}
@RequestMapping(value = "/sendValidateCode", method = RequestMethod.GET)
@ResponseBody
public boolean sendValidateCode(String email) {
boolean result = true;
try {
this.validateCode = this.mailService.sendValidateCode(email);
} catch (Exception exception) {
result = false;
}
return result;
}
@RequestMapping(value = "/updateAccount", method = RequestMethod.POST)
@ResponseBody
public UserDO updateAccount(String email, String password) {
try {
boolean result = this.userService.resetPassword(email, password);
if (result) {
return this.userService.getUserByEmail(email);
}
} catch (Exception exception) {
}
return null;
}
@RequestMapping(value = "/modifyMessage", method = RequestMethod.POST)
@ResponseBody
public boolean modifyMessage(String ID, String telephone) {
return this.userService.changeMessage(ID, telephone);
}
@RequestMapping(value = "/getOwner", method = RequestMethod.GET)
@ResponseBody
public UserDO getOwner(String goodsID) {
return this.userService.getOwner(goodsID);
}
@RequestMapping(value = "/getFiveCity", method = RequestMethod.GET)
@ResponseBody
public List<String> getFiveCity() {
return this.userService.getFiveCity();
}
@RequestMapping(value = "/addFriend", method = RequestMethod.POST)
@ResponseBody
public boolean addFriend(String oneID, String twoID, String name) {
return this.userService.addFriend(oneID, twoID, name);
}
@RequestMapping(value = "/getAllFriends", method = RequestMethod.POST)
@ResponseBody
public List<UserDO> getAllFriends(String oneID) {
return this.userService.getAllFriends(oneID);
}
@RequestMapping(value = "/checkFriend", method = RequestMethod.POST)
@ResponseBody
public boolean checkFriend(String oneID, String twoID) {
return this.userService.checkFriend(oneID, twoID);
}
@RequestMapping(value = "/removeFriend", method = RequestMethod.POST)
@ResponseBody
public boolean removeFriend(String oneID, String twoID) {
return this.userService.removeFriend(oneID, twoID);
}
}