基于javaweb的员工管理系统(前后端分离+java+vue+springboot+ssm+mysql+redis)
运行环境
Java≥8、MySQL≥5.7、Node.js≥10
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的员工管理系统(前后端分离+java+vue+Springboot+ssm+mysql+maven+redis)
一、项目简述
本系统功能包括:分为前端翻后端部分,包括用户,区分晋通用户以及誉里员用户,包括首页展示,部门管理,人事管理,员工管理三个模块等等。
二、项目运行
环境配置: Jdkl . 8 + Tomcats . 5 + Mysql + HBuilderX ( Webstorm 也行)+ Eclispe ( IntelliJ IDEA,Eclispe , MyEclispe , Sts 都支持)。 项目技术: html + css +js + vue + v 一 charts + electron + springboot + mybatis + Mysql + Maven 等等。
员工信息控制层:
/**
*/
@RestController
@RequestMapping(“/employee”)
@CrossOrigin
@Slf4j
public class EmployeeController {
@Autowired
private EmployeeService employeeService;
@Autowired
private DepartmentService departmentService;
@Autowired
private JobService jobService;
@Autowired
private EduLevelMapper eduLevelMapper;
@Autowired
private EmployeeMapper employeeMapper;
/**
*/
@GetMapping(“/search”)
public Result search(@RequestParam(name = “name”, required = false,defaultValue = “”) String name,
@RequestParam(name = “current”, required = false, defaultValue = “1”) Integer current,
@RequestParam(name = “size”, required = false, defaultValue = “10”) Integer size) {
return employeeService.list(current, size, name);
/**
-
分页查询接口
-
@param current
-
@param size
-
@return
*/
@GetMapping(“/list”)
public Result list(@RequestParam(name = “current”, required = false, defaultValue = “1”) Integer current,
@RequestParam(name = “size”, required = false, defaultValue = “10”) Integer size) {
return employeeService.list(current, size, null);
/**
-
根据id获取员工具体信息
-
@param id
-
@return
*/
@GetMapping(“/getUserById”)
public EmployeeDTO getUserAllInfoById(@RequestParam(name = “id”) Integer id) {
return employeeService.getUserById(id);
/**
-
根据员工获取信息
-
@param id
-
@return
*/
@GetMapping(“/getEmployeeById”)
public Employee getUserById(@RequestParam(name = “id”) Integer id) {
return employeeMapper.selectById(id);
/**
-
增加员工接口
-
@param employee
-
@return
*/
@PostMapping(“/add”)
public Map addUser(@RequestBody Employee employee) {
log.info(employee.toString());
return employeeService.add(employee);
/**
-
更新用户
-
@param employee
-
@return
*/
@PostMapping(“/update”)
public Map updateUser(@RequestBody Employee employee) {
log.info(employee.toString());
return employeeService.update(employee);
/**
-
删除用户
-
@param id
-
@return
*/
@GetMapping(“/delete”)
public Result deleteEmployeeById(@RequestParam(name = “id”) Integer id) {
return employeeService.deleteEmployeeById(id);
/**
-
辞退员工
-
@param id
-
@return
*/
@GetMapping(“/dismiss”)
public Map dismissEmployeeById(@RequestParam(name = “id”) Integer id) {
return employeeService.dismissEmployeeById(id);
/**
*/
@GetMapping(“/otherInfo”)
public Result getAllOtherInfo() {
Map info &#61; new HashMap<>();
info.put(“departments”, departmentService.selectAll());
info.put(“jobs”, jobService.selectAll());
info.put(“eduLevels”, eduLevelMapper.selectList(null));
return Result.success(info);
&#64;GetMapping(“/map”)
public Result getMap() {
return employeeService.getMap();
部门信息控制层&#xff1a;
/**
*/
&#64;Slf4j
&#64;RestController
&#64;RequestMapping(“/department”)
&#64;CrossOrigin
public class DepartmentController {
&#64;Autowired
private DepartmentService departmentService;
/**
*/
&#64;GetMapping(“/list”)
public Result list() {
return Result.success(departmentService.selectAll());
&#64;PostMapping(“/add”)
public Map add(&#64;RequestBody Map map) {
log.info(map.toString());
return departmentService.add(map);
用户登录相关接口&#xff1a;
/**
*/
&#64;RestController
&#64;CrossOrigin
public class AuthController {
&#64;Autowired
private AuthService authService;
&#64;PostMapping(“/login”)
public Result login(&#64;RequestParam(name &#61; “email”) String email,
&#64;RequestParam(name &#61; “password”) String password) {
//密码加密
System.out.println(MD5Util.getMD5(password, 11));
return authService.login(email, MD5Util.getMD5(password, 11));