免费分享一套SpringBoot+Vue个人健康管理系统,帅呆了~~

本文主要是介绍免费分享一套SpringBoot+Vue个人健康管理系统,帅呆了~~,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

大家好,我是java1234_小锋老师,看到一个不错的SpringBoot+Vue个人健康管理系统,分享下哈。

项目视频演示

【免费】SpringBoot+Vue个人健康管理系统 Java毕业设计_哔哩哔哩_bilibili【免费】SpringBoot+Vue个人健康管理系统 Java毕业设计项目来自互联网,免费开源分享,严禁商业。更多毕业设源码:http://www.java1234.com/a/bysj/javaweb/, 视频播放量 119、弹幕量 0、点赞数 3、投硬币枚数 0、收藏人数 3、转发人数 0, 视频作者 java1234官方, 作者简介 公众号:java1234 微信:java9266,相关视频:基于springBoot+Vue实现的管理系统,打造前后端分离 权限系统 基于SpringBoot2+SpringSecurity+Vue3.2+Element Plus 视频教程 (火爆连载更新中..),【免费】SpringBoot+Vue旅游管理系统 Java毕业设计,【免费】java贪吃蛇毕业设计,基于SpringBoot+Vue的实现的在线课程管理系统(毕设项目:含系统演示、代码讲解),【免费】微信小程序扫码点餐(订餐)系统(uni-app+SpringBoot后端+Vue管理端技术实现) Java毕业设计,非常好的源码,【免费】Springboot+Vue在线教育平台系统 Java毕业设计,【免费】SpringBoot+Vue汽车租赁管理系统 Java毕业设计,【免费】SpringBoot + Vue + ElementUI 人力资源管理系统 Java毕业设计,我的人生管理系统有名字啦!icon-default.png?t=N7T8https://www.bilibili.com/video/BV1Xx421Q7df/

项目介绍

随着互联网趋势的到来,各行各业都在考虑利用互联网将自己推广出去,最好方式就是建立自己的互联网系统,并对其进行维护和管理。在现实运用中,应用软件的工作规则和开发步骤,采用Java技术建设个人健康信息管理系统。

本毕业设计主要实现集人性化、高效率、便捷等优点于一身的建设个人健康信息管理系统。系统通过浏览器与服务器进行通信,实现数据的交互与变更。只需通过一台电脑,动动手指就可以操作系统,实现数据通信管理。整个系统的设计过程都充分考虑了数据的安全、稳定及可靠等问题,而且操作过程简单。本系统通过科学的管理方式、便捷的服务提高了工作效率,减少了数据存储上的错误和遗漏。

本系统选用Windows7作为服务器端的操作系统,采用目前最流行的B/S结构和java中流行的MVC三层设计模式和IDEA编辑器、MySQL数据库设计并实现的。

系统展示

部分代码

package com.jyx.healthsys.controller;import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jyx.Data_unification.Unification;
import com.jyx.healthsys.entity.Body;
import com.jyx.healthsys.entity.BodyNotes;
import com.jyx.healthsys.entity.SportInfo;
import com.jyx.healthsys.entity.User;
import com.jyx.healthsys.service.IBodyNotesService;
import com.jyx.healthsys.service.IBodyService;
import com.jyx.healthsys.service.IUserService;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;/*** <p>*  前端控制器* </p>** @author 金义雄* @since 2023-02-23*/
//声明此类是一个RestController,即RESTful风格的控制器,控制用户相关的请求。
//是一种设计风格,通过URI来定位资源,并使用HTTP协议中的请求方式(GET、POST、PUT、DELETE等)对资源进行操作
@RestController
@RequestMapping("/user")
public class UserController {@Autowiredprivate IUserService userService;@Autowiredprivate IBodyService bodyService;@Autowiredprivate IBodyNotesService bodyNotesService;/*** 获取所有用户* @return 返回用户列表*/@GetMapping("/all")public Unification<List<User>> getAllUser(){List<User> list = userService.list();return Unification.success(list,"查询成功");}@PostMapping("/login")public Unification<Map<String,Object>> login(@RequestBody User user){Map<String,Object> data = userService.login(user);if (data != null) {return Unification.success(data);}return Unification.fail(20002, "用户名或密码错误");}@PostMapping("/Wxlogin")public Unification<Map<String,Object>> Wxlogin(@RequestBody User user){Map<String,Object> data = userService.login(user);if (data != null) {return Unification.success(data);}return Unification.fail();}@PostMapping("/register")public Unification<Map<String,Object>> register(@RequestBody User register) {Map<String,Object> data = userService.register(register);if (data.get("success")!= null){return Unification.success("注册成功");}else {return Unification.fail(20004,"注册失败,用户名已存在");}}@GetMapping("/info")public Unification<Map<String,Object>> getUserInfo(@RequestParam("token") String token){// 根据token获取用户信息Map<String,Object> data = userService.getUserInfo(token); // 调用userService的getUserInfo方法,传递token参数,返回一个Map<String,Object>类型的dataif (data!=null){return Unification.success(data); // 如果data不为null,返回成功响应,将data作为响应数据返回}return Unification.fail(20003,"登录信息有误,请重新登录"); // 如果data为null,返回失败响应,返回错误码和错误信息}@PostMapping("/logout")public Unification<?> logout(@RequestHeader("X-Token")String token){userService.logout(token);//将当前用户的登录状态从系统中注销return Unification.success();}/**根据查询条件获取用户列表,分页查询@param username 查询条件:用户名,可选@param phone 查询条件:手机号,可选@param pageNo 当前页码@param pageSize 页面大小@return 返回Unification包装后的用户列表,包含总数和当前页码的用户信息列表*/@GetMapping("/list")public Unification<Map<String,Object>> getUserList(@RequestParam(value = "username", required = false) String username,@RequestParam(value = "phone", required = false) String phone,@RequestParam("pageNo") Long pageNo,@RequestParam("pageSize") Long pageSize) {LambdaQueryWrapper<User> wrapper = new LambdaQueryWrapper<>();wrapper.eq(StringUtils.hasLength(username), User::getUsername, username);wrapper.eq(StringUtils.hasLength(phone), User::getPhone, phone);Page<User> page = new Page<>(pageNo, pageSize);userService.page(page, wrapper);Map<String, Object> data = new HashMap<>();data.put("total", page.getTotal()); // 用户总数data.put("rows", page.getRecords()); // 用户列表return Unification.success(data);}@PostMapping("/add")public Unification<?> addUser(@RequestBody User user){boolean result = userService.addUser(user);if (result) {return Unification.success("新增成功");} else {return Unification.fail("用户名已存在");}}@PutMapping("/update")public Unification<?> updateUser(@RequestBody User user){user.setPassword(null); // 防止密码被修改,将密码设为nulluserService.updateUser(user);return Unification.success("修改成功");}@GetMapping("/{id}")public Unification<User> getUserById(@PathVariable("id") Integer id){// 通过用户id调用userService的getUserById方法获取用户信息User user = userService.getUserById(id);// 将获取到的用户信息封装成Unification类型并返回return  Unification.success(user);}@GetMapping("/getBodyNotes/{id}")public Unification<List<BodyNotes>> getBodyNotes(@PathVariable("id") Integer id){List<BodyNotes> bodyNotesList = bodyNotesService.getBodyNotes(id);if (bodyNotesList == null || bodyNotesList.isEmpty()) { // 判断列表是否为空return Unification.fail("没有找到多余的记录");}return  Unification.success(bodyNotesList);}@GetMapping("/WxgetBodyNotes/{token}")public Unification<Map<String,Object>> WxgetBodyNotes(@PathVariable("token") String token){// 根据token获取用户信息Map<String,Object> data = userService.WxgetUserId(token);Integer userId = Integer.parseInt(data.get("id").toString());List<BodyNotes> bodyNotes = bodyNotesService.getBodyNotes(userId);data.put("bodyNotes", bodyNotes);System.out.println(data);if (data != null){return Unification.success(data);}return Unification.fail();}@DeleteMapping("/{id}")public Unification<User> deleteUserById(@PathVariable("id") Integer id){userService.deletUserById(id);return  Unification.success("删除成功");}@PostMapping("/BodyInformation")public Unification<?> BodyInfomationUp(@RequestBody Body body){boolean result = bodyService.insert(body);if(result == true){return Unification.success("上传成功");}else{return Unification.success("更新成功");}}@PostMapping("/BodyInformationNotes")public Unification<?> BodyInformationNotes(@RequestBody BodyNotes bodyNotes){bodyNotesService.insert(bodyNotes);return Unification.success();}@GetMapping("/getUserId")public Unification<Map<String, Object>> getUserId() {Map<String, Object> data = userService.getUserId();System.out.println("id"+data);if (data != null) {return Unification.success(data);} else {return Unification.fail("用户id获取失败");}}@GetMapping("/getBodyInfo")public Unification<Map<String, Object>> getBodyInfo() {Map<String, Object> data = userService.getBodyInfo();if (data != null) {return Unification.success(data);} else {return Unification.fail(20002);}}@GetMapping("/getBodyList")public Unification<Map<String,Object>> getBodyList(@RequestParam(value = "name", required = false) String name,@RequestParam(value = "id", required = false) String id,@RequestParam("pageNo") Long pageNo,@RequestParam("pageSize") Long pageSize) {LambdaQueryWrapper<Body> wrapper = new LambdaQueryWrapper<>();wrapper.eq(StringUtils.hasLength(name), Body::getName, name);wrapper.eq(StringUtils.hasLength(id), Body::getId, id);Page<Body> page = new Page<>(pageNo, pageSize); // 构建分页对象,指定页码和每页大小bodyService.page(page, wrapper); // 调用userService的分页查询方法,查询指定页码、每页大小和查询条件的用户列表Map<String, Object> data = new HashMap<>();data.put("total", page.getTotal()); // 将查询到的用户总数放入响应数据中data.put("rows", page.getRecords()); // 将查询到的用户列表放入响应数据中return Unification.success(data);}@GetMapping("/getBodyById/{id}")public Unification<Body> getBodyById(@PathVariable("id") Integer id){// 通过用户id调用userService的getUserById方法获取用户信息Body body = bodyService.getBodyById(id);// 将获取到的用户信息封装成Unification类型并返回return  Unification.success(body);}@RequestMapping("/updateBody")public Unification<?> updateBody(@RequestBody Body body){bodyService.updateBody(body);return Unification.success("修改成功");}@DeleteMapping("/deleteBodyById/{id}")public Unification<SportInfo> deleteBodyById(@PathVariable("id") Integer id){bodyService.deletBodyById(id);bodyNotesService.delete(id);return  Unification.success("删除成功");}@PutMapping("/changePassword")public Unification<?> changePassword(@RequestBody User user){if (userService.updateuser(user)){return Unification.success("修改成功,本次已为您登陆,下次登陆请用您的新密码");}return Unification.fail("修改失败,用户名或密码错误");}@GetMapping("/getUserBodyList")public Unification<Map<String, Object>> getUserBodyList(@RequestParam("pageNo") Long pageNo,@RequestParam("pageSize") Long pageSize) {LambdaQueryWrapper<BodyNotes> wrapper = new LambdaQueryWrapper<>();Map<String, Object> userid = userService.getUserId();if (userid.get("id") != null) {wrapper.eq(BodyNotes::getId, userid.get("id"));} else {// 如果userid.get("id")为null,则返回一个空的查询条件wrapper.isNull(BodyNotes::getId);}Page<BodyNotes> page = new Page<>(pageNo, pageSize); // 构建分页对象,指定页码和每页大小bodyNotesService.page(page, wrapper); // 调用userService的分页查询方法,查询指定页码、每页大小和查询条件的用户列表Map<String, Object> data = new HashMap<>();data.put("total", page.getTotal()); // 将查询到的用户总数放入响应数据中data.put("rows", page.getRecords()); // 将查询到的用户列表放入响应数据中return Unification.success(data);}@GetMapping("/getUserBodyById/{notesid}")public Unification<BodyNotes> getUserBodyById(@PathVariable("notesid") Integer notesid){System.out.println(notesid);BodyNotes bodyNotes = bodyNotesService.getUserBodyById(notesid);return  Unification.success(bodyNotes);}@RequestMapping("/updateUserBody")public Unification<?> updateUserBody(@RequestBody BodyNotes bodyNotes){bodyNotesService.updateUserBody(bodyNotes);return Unification.success("修改成功");}@DeleteMapping("/deleteUserBodyById/{notesid}")public Unification<SportInfo> deleteUserBodyById(@PathVariable("notesid") Integer notesid){bodyNotesService.deleteUserBodyById(notesid);return  Unification.success("删除成功");}}
<template><div class="register-form"><h1>用户注册</h1><el-form :model="form" ref="form" :rules="rules" label-width="80px" class="form"><el-form-item label="用户名" prop="username"><el-input v-model="form.username" placeholder="请输入用户名"></el-input></el-form-item><el-form-item label="密码" prop="password"><el-input v-model="form.password" type="password" placeholder="请输入密码"></el-input></el-form-item><el-form-item label="确认密码" prop="confirmPassword"><el-input v-model="form.confirmPassword" type="password" placeholder="请确认密码"></el-input></el-form-item><!-- <el-form-item label="邮箱" prop="email"><el-input v-model="form.email" placeholder="请输入邮箱"></el-input></el-form-item> --><el-form-item><el-button type="primary" @click="submitForm">注册</el-button></el-form-item></el-form></div></template><script >import userApi from "@/api/userManage";export default {data() {return {form: {username: '',password: '',confirmPassword: '',email: ''},rules: {username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],password: [{ required: true, message: '请输入密码', trigger: 'blur' },{ min: 6, message: '密码长度不能少于6位', trigger: 'blur' }],confirmPassword: [{ required: true, message: '请确认密码', trigger: 'blur' },{ validator: this.validateConfirmPassword, trigger: 'blur' }],// email: [//   { required: true, message: '请输入邮箱', trigger: 'blur' },//   { type: 'email', message: '邮箱格式不正确', trigger: 'blur' }// ],}}},methods: {submitForm() {this.$refs.form.validate(valid => {if (valid) {// 构造请求体const requestBody = {username: this.form.username,password: this.form.password,email: this.form.email};//提交验证给后台userApi.register(requestBody).then(response=> {//成功提示this.$message({message: response.message,type: "success"});this.$router.push('/login');});} else {return false;}});},validateConfirmPassword(rule, value, callback) {if (value !== this.form.password) {callback(new Error('两次输入的密码不一致'))} else {callback()}}}}</script><style scoped>.register-form {margin: 50px auto;max-width: 500px;padding: 20px;background-color: #fff;border: 1px solid #ddd;border-radius: 5px;box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);font-family: Arial, sans-serif;}.register-form h1 {margin-top: 0;text-align: center;font-size: 28px;font-weight: 500;}.form {margin-top: 30px;}</style>

源码下载

CSDN 1积分下载:https://download.csdn.net/download/caofeng891102/89036769

或者免费领取加小锋老师wx:java9266

热门推荐

免费分享一套SpringBoot+Vue企业考勤管理系统,帅呆了~~-CSDN博客

免费分享一套SpringBoot+Vue旅游管理系统,帅呆了~~-CSDN博客

免费分享一套微信小程序扫码点餐(订餐)系统(uni-app+SpringBoot后端+Vue管理端技术实现) ,帅呆了~~_微信小程序扫码点餐 java vue-CSDN博客

免费分享一套SpringBoot+Vue药店(药房)管理系统,帅呆了~~_基于sprintboot+vue的药店管理系统-CSDN博客

免费分享一套SpringBoot+Vue实验室(预约)管理系统,帅呆了~~-CSDN博客

这篇关于免费分享一套SpringBoot+Vue个人健康管理系统,帅呆了~~的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/858318

相关文章

SpringBoot中四种AOP实战应用场景及代码实现

《SpringBoot中四种AOP实战应用场景及代码实现》面向切面编程(AOP)是Spring框架的核心功能之一,它通过预编译和运行期动态代理实现程序功能的统一维护,在SpringBoot应用中,AO... 目录引言场景一:日志记录与性能监控业务需求实现方案使用示例扩展:MDC实现请求跟踪场景二:权限控制与

Java NoClassDefFoundError运行时错误分析解决

《JavaNoClassDefFoundError运行时错误分析解决》在Java开发中,NoClassDefFoundError是一种常见的运行时错误,它通常表明Java虚拟机在尝试加载一个类时未能... 目录前言一、问题分析二、报错原因三、解决思路检查类路径配置检查依赖库检查类文件调试类加载器问题四、常见

Java注解之超越Javadoc的元数据利器详解

《Java注解之超越Javadoc的元数据利器详解》本文将深入探讨Java注解的定义、类型、内置注解、自定义注解、保留策略、实际应用场景及最佳实践,无论是初学者还是资深开发者,都能通过本文了解如何利用... 目录什么是注解?注解的类型内置注编程解自定义注解注解的保留策略实际用例最佳实践总结在 Java 编程

Java 实用工具类Spring 的 AnnotationUtils详解

《Java实用工具类Spring的AnnotationUtils详解》Spring框架提供了一个强大的注解工具类org.springframework.core.annotation.Annot... 目录前言一、AnnotationUtils 的常用方法二、常见应用场景三、与 JDK 原生注解 API 的

Java controller接口出入参时间序列化转换操作方法(两种)

《Javacontroller接口出入参时间序列化转换操作方法(两种)》:本文主要介绍Javacontroller接口出入参时间序列化转换操作方法,本文给大家列举两种简单方法,感兴趣的朋友一起看... 目录方式一、使用注解方式二、统一配置场景:在controller编写的接口,在前后端交互过程中一般都会涉及

Java中的StringBuilder之如何高效构建字符串

《Java中的StringBuilder之如何高效构建字符串》本文将深入浅出地介绍StringBuilder的使用方法、性能优势以及相关字符串处理技术,结合代码示例帮助读者更好地理解和应用,希望对大家... 目录关键点什么是 StringBuilder?为什么需要 StringBuilder?如何使用 St

使用Java将各种数据写入Excel表格的操作示例

《使用Java将各种数据写入Excel表格的操作示例》在数据处理与管理领域,Excel凭借其强大的功能和广泛的应用,成为了数据存储与展示的重要工具,在Java开发过程中,常常需要将不同类型的数据,本文... 目录前言安装免费Java库1. 写入文本、或数值到 Excel单元格2. 写入数组到 Excel表格

Java并发编程之如何优雅关闭钩子Shutdown Hook

《Java并发编程之如何优雅关闭钩子ShutdownHook》这篇文章主要为大家详细介绍了Java如何实现优雅关闭钩子ShutdownHook,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起... 目录关闭钩子简介关闭钩子应用场景数据库连接实战演示使用关闭钩子的注意事项开源框架中的关闭钩子机制1.

Maven中引入 springboot 相关依赖的方式(最新推荐)

《Maven中引入springboot相关依赖的方式(最新推荐)》:本文主要介绍Maven中引入springboot相关依赖的方式(最新推荐),本文给大家介绍的非常详细,对大家的学习或工作具有... 目录Maven中引入 springboot 相关依赖的方式1. 不使用版本管理(不推荐)2、使用版本管理(推

Java 中的 @SneakyThrows 注解使用方法(简化异常处理的利与弊)

《Java中的@SneakyThrows注解使用方法(简化异常处理的利与弊)》为了简化异常处理,Lombok提供了一个强大的注解@SneakyThrows,本文将详细介绍@SneakyThro... 目录1. @SneakyThrows 简介 1.1 什么是 Lombok?2. @SneakyThrows