免费分享一套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

相关文章

Spring IOC的三种实现方式详解

《SpringIOC的三种实现方式详解》:本文主要介绍SpringIOC的三种实现方式,在Spring框架中,IOC通过依赖注入来实现,而依赖注入主要有三种实现方式,构造器注入、Setter注入... 目录1. 构造器注入(Cons编程tructor Injection)2. Setter注入(Setter

Java function函数式接口的使用方法与实例

《Javafunction函数式接口的使用方法与实例》:本文主要介绍Javafunction函数式接口的使用方法与实例,函数式接口如一支未完成的诗篇,用Lambda表达式作韵脚,将代码的机械美感... 目录引言-当代码遇见诗性一、函数式接口的生物学解构1.1 函数式接口的基因密码1.2 六大核心接口的形态学

Spring IOC控制反转的实现解析

《SpringIOC控制反转的实现解析》:本文主要介绍SpringIOC控制反转的实现,IOC是Spring的核心思想之一,它通过将对象的创建、依赖注入和生命周期管理交给容器来实现解耦,使开发者... 目录1. IOC的基本概念1.1 什么是IOC1.2 IOC与DI的关系2. IOC的设计目标3. IOC

Spring Boot统一异常拦截实践指南(最新推荐)

《SpringBoot统一异常拦截实践指南(最新推荐)》本文介绍了SpringBoot中统一异常处理的重要性及实现方案,包括使用`@ControllerAdvice`和`@ExceptionHand... 目录Spring Boot统一异常拦截实践指南一、为什么需要统一异常处理二、核心实现方案1. 基础组件

java中的HashSet与 == 和 equals的区别示例解析

《java中的HashSet与==和equals的区别示例解析》HashSet是Java中基于哈希表实现的集合类,特点包括:元素唯一、无序和可包含null,本文给大家介绍java中的HashSe... 目录什么是HashSetHashSet 的主要特点是HashSet 的常用方法hasSet存储为啥是无序的

vue基于ElementUI动态设置表格高度的3种方法

《vue基于ElementUI动态设置表格高度的3种方法》ElementUI+vue动态设置表格高度的几种方法,抛砖引玉,还有其它方法动态设置表格高度,大家可以开动脑筋... 方法一、css + js的形式这个方法需要在表格外层设置一个div,原理是将表格的高度设置成外层div的高度,所以外层的div需要

IDEA运行spring项目时,控制台未出现的解决方案

《IDEA运行spring项目时,控制台未出现的解决方案》文章总结了在使用IDEA运行代码时,控制台未出现的问题和解决方案,问题可能是由于点击图标或重启IDEA后控制台仍未显示,解决方案提供了解决方法... 目录问题分析解决方案总结问题js使用IDEA,点击运行按钮,运行结束,但控制台未出现http://

解决Spring运行时报错:Consider defining a bean of type ‘xxx.xxx.xxx.Xxx‘ in your configuration

《解决Spring运行时报错:Considerdefiningabeanoftype‘xxx.xxx.xxx.Xxx‘inyourconfiguration》该文章主要讲述了在使用S... 目录问题分析解决方案总结问题Description:Parameter 0 of constructor in x

解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题

《解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题》文章详细描述了在使用lombok的@Data注解标注实体类时遇到编译无误但运行时报错的问题,分析... 目录问题分析问题解决方案步骤一步骤二步骤三总结问题使用lombok注解@Data标注实体类,编译时

JSON字符串转成java的Map对象详细步骤

《JSON字符串转成java的Map对象详细步骤》:本文主要介绍如何将JSON字符串转换为Java对象的步骤,包括定义Element类、使用Jackson库解析JSON和添加依赖,文中通过代码介绍... 目录步骤 1: 定义 Element 类步骤 2: 使用 Jackson 库解析 jsON步骤 3: 添