Java项目:员工管理系统(前后端分离+java+vue+Springboot+ssm+mysql+maven+redis)
2022/2/13 19:19:06
本文主要是介绍Java项目:员工管理系统(前后端分离+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<String, Object> addUser(@RequestBody Employee employee) { log.info(employee.toString()); return employeeService.add(employee); } /** * 更新用户 * @param employee * @return */ @PostMapping("/update") public Map<String, Object> 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<String, Object> dismissEmployeeById(@RequestParam(name = "id") Integer id) { return employeeService.dismissEmployeeById(id); } /** * 得到所以工作,部门,学历信息 * * @return */ @GetMapping("/otherInfo") public Result getAllOtherInfo() { Map<String, Object> info = new HashMap<>(); info.put("departments", departmentService.selectAll()); info.put("jobs", jobService.selectAll()); info.put("eduLevels", eduLevelMapper.selectList(null)); return Result.success(info); } @GetMapping("/map") public Result getMap() { return employeeService.getMap(); } }
部门信息控制层:
/** * 部门信息控制层 */ @Slf4j @RestController @RequestMapping("/department") @CrossOrigin public class DepartmentController { @Autowired private DepartmentService departmentService; /** * 查询所以部门 * @return */ @GetMapping("/list") public Result list() { return Result.success(departmentService.selectAll()); } @PostMapping("/add") public Map<String, Object> add(@RequestBody Map<String, Object> map) { log.info(map.toString()); return departmentService.add(map); } }
用户登录相关接口:
/** * 用户登录相关接口 * */ @RestController @CrossOrigin public class AuthController { @Autowired private AuthService authService; @PostMapping("/login") public Result login(@RequestParam(name = "email") String email, @RequestParam(name = "password") String password) { //密码加密 System.out.println(MD5Util.getMD5(password, 11)); return authService.login(email, MD5Util.getMD5(password, 11)); } }
源码获取:博客首页 "资源" 里下载!
这篇关于Java项目:员工管理系统(前后端分离+java+vue+Springboot+ssm+mysql+maven+redis)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2025-01-01一个基于注解驱动的可视化的DDD架构-超越COLA的设计
- 2025-01-01PlantUML 时序图 基本例子
- 2025-01-01plantuml 信号时序图
- 2025-01-01聊聊springboot项目如何优雅进行数据校验
- 2024-12-31自由职业者效率提升指南:3个时间管理技巧搞定多个项目
- 2024-12-31适用于咨询行业的项目管理工具:提升跨团队协作和工作效率的最佳选择
- 2024-12-31高效协作的未来:2024年实时文档工具深度解析
- 2024-12-31商务谈判者的利器!哪 6 款办公软件能提升春节合作成功率?
- 2024-12-31小团队如何选择最实用的项目管理工具?高效协作与任务追踪指南
- 2024-12-31数据赋能,智慧养老:看板软件如何重塑养老服务生态