——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7、Node.js≥14
开发工具 后端:eclipse/idea/myeclipse/sts等均可配置运行 前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SpringBoot健身房管理系统(java+springboot+maven+vue+elementui+layui+mysql)
项目介绍
基于SpringBoot Vue的私人健身与教练预约管理系统
角色:管理员、用户、教练
管理员:管理员登录系统后,可以对首页、个人中心、用户管理、服务人员管理、服务信息管理、服务类型管理、服务预约管理、服务取消管理、服务分配管理、服务进度管理、评价信息管理、留言反馈、系统管理等功能进行相应的操作管理
用户:用户登录进入系统可以对首页,预约,个人中心,教练预约管理等功能
教练:教练登录进入系统可以对首页,个人中心,教练信息管理,教练预约管理等功能
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 4.数据库:MySql 5.7/8.0版本均可; 5.是否Maven项目:是;
技术栈
后端:SpringBoot+Mybaits
前端:Vue+ElementUI+Layui+HTML+CSS+JS
使用说明
项目运行: 1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,控制台提示运行成功后再去运行前端项目; 5. 管理员用户名密码:admin/admin 普通用户名密码:user/123456
文章拆分的解读:
首页的展示情况:
每个项目的具体详情:
健身的咨询信息:
个人中心的管理情况详情:
后台管理情况的一个总体详情:
教练信息的一个详情列表:
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 @RestController @RequestMapping("/storeup") public class StoreupController { @Autowired private StoreupService storeupService; @RequestMapping("/page") public R page (@RequestParam Map<String, Object> params,StoreupEntity storeup, HttpServletRequest request) { if (!request.getSession().getAttribute("role" ).toString().equals("管理员" )) { storeup.setUserid((Long)request.getSession().getAttribute("userId" )); } EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>(); PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params)); return R.ok().put("data" , page); }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 @RequestMapping("/page") public R page (@RequestParam Map<String, Object> params,JiaolianyuyueEntity jiaolianyuyue, HttpServletRequest request) { String tableName = request.getSession().getAttribute("tableName" ).toString(); if (tableName.equals("jiaolian" )) { jiaolianyuyue.setJiaolianbianhao((String)request.getSession().getAttribute("username" )); } if (tableName.equals("yonghu" )) { jiaolianyuyue.setZhanghao((String)request.getSession().getAttribute("username" )); } EntityWrapper<JiaolianyuyueEntity> ew = new EntityWrapper<JiaolianyuyueEntity>(); PageUtils page = jiaolianyuyueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiaolianyuyue), params), params)); return R.ok().put("data" , page); } @IgnoreAuth @RequestMapping("/list") public R list (@RequestParam Map<String, Object> params,JiaolianyuyueEntity jiaolianyuyue, HttpServletRequest request) { EntityWrapper<JiaolianyuyueEntity> ew = new EntityWrapper<JiaolianyuyueEntity>(); PageUtils page = jiaolianyuyueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiaolianyuyue), params), params)); return R.ok().put("data" , page); } @RequestMapping("/lists") public R list ( JiaolianyuyueEntity jiaolianyuyue) { EntityWrapper<JiaolianyuyueEntity> ew = new EntityWrapper<JiaolianyuyueEntity>(); ew.allEq(MPUtil.allEQMapPre( jiaolianyuyue, "jiaolianyuyue" )); return R.ok().put("data" , jiaolianyuyueService.selectListView(ew)); }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 @RequestMapping("/info/{id}") public R info (@PathVariable("id") String id) { UserEntity user = userService.selectById(id); return R.ok().put("data" , user); } @RequestMapping("/session") public R getCurrUser (HttpServletRequest request) { Long id = (Long)request.getSession().getAttribute("userId" ); UserEntity user = userService.selectById(id); return R.ok().put("data" , user); } @PostMapping("/save") public R save (@RequestBody UserEntity user) { if (userService.selectOne(new EntityWrapper<UserEntity>().eq("username" , user.getUsername())) !=null ) { return R.error("用户已存在" ); } userService.insert(user); return R.ok(); } @RequestMapping("/update") public R update (@RequestBody UserEntity user) { UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username" , user.getUsername())); if (u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 } @RequestMapping("/update") public R update (@RequestBody NewsEntity news, HttpServletRequest request) { newsService.updateById(news); return R.ok(); } @RequestMapping("/delete") public R delete (@RequestBody Long[] ids) { newsService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); } @RequestMapping("/remind/{columnName}/{type}") public R remindCount (@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) { map.put("column" , columnName); map.put("type" , type); if (type.equals("2" )) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd" ); Calendar c = Calendar.getInstance(); Date remindStartDate = null ; Date remindEndDate = null ; if (map.get("remindstart" )!=null ) { Integer remindStart = Integer.parseInt(map.get("remindstart" ).toString()); c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart); remindStartDate = c.getTime();
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 @RestController @RequestMapping("/jianshenxiangmu") public class JianshenxiangmuController { @Autowired private JianshenxiangmuService jianshenxiangmuService; @Autowired private StoreupService storeupService; @RequestMapping("/page") public R page (@RequestParam Map<String, Object> params,JianshenxiangmuEntity jianshenxiangmu, HttpServletRequest request) { EntityWrapper<JianshenxiangmuEntity> ew = new EntityWrapper<JianshenxiangmuEntity>(); PageUtils page = jianshenxiangmuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jianshenxiangmu), params), params)); return R.ok().put("data" , page); } @IgnoreAuth @RequestMapping("/list") public R list (@RequestParam Map<String, Object> params,JianshenxiangmuEntity jianshenxiangmu, HttpServletRequest request) { EntityWrapper<JianshenxiangmuEntity> ew = new EntityWrapper<JianshenxiangmuEntity>(); PageUtils page = jianshenxiangmuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jianshenxiangmu), params), params)); return R.ok().put("data" , page); } @RequestMapping("/lists") public R list ( JianshenxiangmuEntity jianshenxiangmu) { EntityWrapper<JianshenxiangmuEntity> ew = new EntityWrapper<JianshenxiangmuEntity>();
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 } @RequestMapping("/info/{id}") public R info (@PathVariable("id") Long id) { NewsEntity news = newsService.selectById(id); return R.ok().put("data" , news); } @IgnoreAuth @RequestMapping("/detail/{id}") public R detail (@PathVariable("id") Long id) { NewsEntity news = newsService.selectById(id); return R.ok().put("data" , news); } @RequestMapping("/save") public R save (@RequestBody NewsEntity news, HttpServletRequest request) { news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000 )).longValue()); newsService.insert(news); return R.ok(); } @RequestMapping("/add") public R add (@RequestBody NewsEntity news, HttpServletRequest request) { news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000 )).longValue()); newsService.insert(news); return R.ok(); }
——————————PayStart——————————
项目链接: https://javayms.github.io?id=381524170701201gq https://javayms.pages.dev?id=381524170701201gq