java版工程项目管理系统 Spring Cloud+Spring Boot+Mybatis+Vue+ElementUI+前后端分离 功能清单
发布人:shili8
发布时间:2024-11-07 05:13
阅读次数:0
**Java版工程项目管理系统**
**功能清单**
1. **用户管理**
* 用户注册* 用户登录* 用户信息修改* 用户密码重置2. **项目管理**
*项目创建*项目列表展示*项目详情查看*项目成员添加/删除3. **任务管理**
*任务创建*任务列表展示*任务详情查看*任务状态修改4. **日志管理**
* 日志记录* 日志列表展示5. **通知管理**
* 通知发送* 通知列表展示**技术栈**
* Spring Cloud:微服务架构* Spring Boot:快速开发框架* Mybatis:持久层框架* Vue:前端框架* ElementUI:前端组件库**系统设计**
1. **用户模块**
* 用户注册表单验证* 用户登录认证* 用户信息修改和密码重置2. **项目模块**
*项目创建表单验证*项目列表展示*项目详情查看*项目成员添加/删除3. **任务模块**
*任务创建表单验证*任务列表展示*任务详情查看*任务状态修改4. **日志模块**
* 日志记录* 日志列表展示5. **通知模块**
* 通知发送* 通知列表展示**系统实现**
### 用户模块#### UserController.java
java@RestController@RequestMapping("/users") public class UserController { @Autowired private UserService userService; @PostMapping("/register") public Result register(@RequestBody User user) { // 表单验证 if (!userService.validateUser(user)) { return Result.error("注册失败"); } // 注册用户 userService.registerUser(user); return Result.success(); } @PostMapping("/login") public Result login(@RequestBody LoginRequest request) { // 登录认证 User user = userService.login(request.getUsername(), request.getPassword()); if (user == null) { return Result.error("登录失败"); } return Result.success(user); } @PutMapping("/{id}") public Result update(@PathVariable Long id, @RequestBody User user) { // 更新用户信息 userService.updateUser(id, user); return Result.success(); } @PostMapping("/password/reset") public Result resetPassword(@RequestBody ResetPasswordRequest request) { // 重置密码 userService.resetPassword(request.getUsername(), request.getPassword()); return Result.success(); } }
#### UserService.java
java@Servicepublic class UserService { @Autowired private UserRepository userRepository; public boolean validateUser(User user) { // 表单验证逻辑 } public User registerUser(User user) { // 注册用户逻辑 } public User login(String username, String password) { // 登录认证逻辑 } public void updateUser(Long id, User user) { // 更新用户信息逻辑 } public void resetPassword(String username, String password) { // 重置密码逻辑 } }
###项目模块#### ProjectController.java
java@RestController@RequestMapping("/projects") public class ProjectController { @Autowired private ProjectService projectService; @PostMapping("/create") public Result create(@RequestBody CreateProjectRequest request) { // 表单验证 if (!projectService.validateProject(request)) { return Result.error("创建项目失败"); } // 创建项目 projectService.createProject(request); return Result.success(); } @GetMapping("/") public Result list() { // 列表展示 Listprojects = projectService.listProjects(); return Result.success(projects); } @GetMapping("/{id}") public Result detail(@PathVariable Long id) { // 详情查看 Project project = projectService.getProject(id); return Result.success(project); } @PutMapping("/{id}/members") public Result addMember(@PathVariable Long id, @RequestBody AddMemberRequest request) { // 添加成员 projectService.addMember(id, request.getUsername()); return Result.success(); } }
#### ProjectService.java
java@Servicepublic class ProjectService { @Autowired private ProjectRepository projectRepository; public boolean validateProject(CreateProjectRequest request) { // 表单验证逻辑 } public void createProject(CreateProjectRequest request) { // 创建项目逻辑 } public ListlistProjects() { // 列表展示逻辑 } public Project getProject(Long id) { // 详情查看逻辑 } public void addMember(Long id, String username) { // 添加成员逻辑 } }
###任务模块#### TaskController.java
java@RestController@RequestMapping("/tasks") public class TaskController { @Autowired private TaskService taskService; @PostMapping("/create") public Result create(@RequestBody CreateTaskRequest request) { // 表单验证 if (!taskService.validateTask(request)) { return Result.error("创建任务失败"); } // 创建任务 taskService.createTask(request); return Result.success(); } @GetMapping("/") public Result list() { // 列表展示 Listtasks = taskService.listTasks(); return Result.success(tasks); } @GetMapping("/{id}") public Result detail(@PathVariable Long id) { // 详情查看 Task task = taskService.getTask(id); return Result.success(task); } @PutMapping("/{id}/status") public Result updateStatus(@PathVariable Long id, @RequestBody UpdateStatusRequest request) { // 更新状态 taskService.updateStatus(id, request.getStatus()); return Result.success(); } }
#### TaskService.java
java@Servicepublic class TaskService { @Autowired private TaskRepository taskRepository; public boolean validateTask(CreateTaskRequest request) { // 表单验证逻辑 } public void createTask(CreateTaskRequest request) { // 创建任务逻辑 } public ListlistTasks() { // 列表展示逻辑 } public Task getTask(Long id) { // 详情查看逻辑 } public void updateStatus(Long id, String status) { // 更新状态逻辑 } }
### 日志模块#### LogController.java
java@RestController@RequestMapping("/logs") public class LogController { @Autowired private LogService logService; @PostMapping("/record") public Result record(@RequestBody RecordLogRequest request) { // 记录日志 logService.recordLog(request); return Result.success(); } @GetMapping("/") public Result list() { // 列表展示 Listlogs = logService.listLogs(); return Result.success(logs); } }
#### LogService.java
java@Servicepublic class LogService { @Autowired private LogRepository logRepository; public void recordLog(RecordLogRequest request) { // 记录日志逻辑 } public ListlistLogs() { // 列表展示逻辑 } }
### 通知模块#### NoticeController.java
java@RestController@RequestMapping("/notices") public class NoticeController { @Autowired private NoticeService noticeService; @PostMapping("/send") public Result send(@RequestBody SendNoticeRequest request) { // 发送通知 noticeService.sendNotice(request); return Result.success(); } @GetMapping("/") public Result list() { // 列表展示 Listnotices = noticeService.listNotices(); return Result.success(notices); } }
#### NoticeService.java
java@Servicepublic class NoticeService { @Autowired private NoticeRepository noticeRepository; public void sendNotice(SendNoticeRequest request) { // 发送通知逻辑 } public ListlistNotices() { // 列表展示逻辑 } }
### 前端实现#### main.js
javascriptimport Vue from 'vue' import App from './App.vue' Vue.config.productionTip = falsenew Vue({ render: h => h(App), }).$mount('#app')
#### App.vue
html<template> <div id="app"> <router-view /> </div> </template> <script> export default { name: 'App' } </script> <style lang="scss" scoped> #app { font-family: Avenir, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-align: center; color: #2c3e50; } </style