基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统

项目介绍

本健身房课程预约网站系统是针对目前健身信息交流网站的实际需求,从实际工作出发,对过去的健身网站系统存在的问题进行分析,结合计算机系统的结构、概念、模型、原理、方法,在计算机各种优势的情况下,采用目前最流行的B/S结构和java中流行的MVC三层设计模式和idea编辑器、MySQL 数据库设计并实现的。本健身房课程预约管理系统主要包括系统会员管理模块、课程管理模块、教练管理模块、收藏模块、登录模块、论坛交流模块、订单管理模块、留言管理模块、健身资讯模块、在线客服模块、器材管理模块、退出等多个模块。它帮助健身房课程预约管理系统实现了信息化、网络化,通过测试,实现了系统设计目标,相比传统的管理模式,本系统合理的利用了健身网站数据资源,有效的减少了健身信息交流网站的经济投入,大大提高了健身信息交流网站的效率。

开发环境

开发语言:Java
数据库 :MySQL
系统架构:B/S
后端框架:SpringBoot
前端框架:Vue
开发工具:IDEA或者Eclipse,JDK1.8,Maven

系统截图


基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第1张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第2张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第3张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第4张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第5张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第6张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第7张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第8张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第9张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第10张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第11张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第12张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第13张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第14张图片
基于java+springboot+mybatis+vue+elementui的健身房课程预约管理系统_第15张图片

部分代码

package com.controller;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.EquipmentEntity;
import com.service.EquipmentService;
import com.service.YonghuService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.List;
import java.util.Map;


@RestController
@RequestMapping("/equipment")
public class EquipmentController {
    @Autowired
    private EquipmentService equipmentService;

    @Autowired
    private YonghuService yonghuService;

    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, EquipmentEntity equipment,
                  HttpServletRequest request){
        EntityWrapper<EquipmentEntity> ew = new EntityWrapper<EquipmentEntity>();
		PageUtils page = equipmentService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, equipment), params), params));
        return R.ok().put("data", page);
    }

    /**
     * 查询所有
     * @param request
     * @return
     */
    @RequestMapping("/findAll")
    public R findAll(HttpServletRequest request) {
        EntityWrapper<EquipmentEntity> ew = new EntityWrapper<EquipmentEntity>();
        List<EquipmentEntity> equipmentEntityList=equipmentService.selectList(ew);
        return R.ok().put("data", equipmentEntityList);
    }

    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params, EquipmentEntity equipment, HttpServletRequest request){
        EntityWrapper<EquipmentEntity> ew = new EntityWrapper<EquipmentEntity>();
		PageUtils page = equipmentService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, equipment), params), params));
        return R.ok().put("data", page);
    }


    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        EquipmentEntity equipment = equipmentService.selectById(id);
        return R.ok().put("data", equipment);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        EquipmentEntity equipment = equipmentService.selectById(id);
        return R.ok().put("data", equipment);
    }


    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody EquipmentEntity equipment, HttpServletRequest request){
        equipmentService.insert(equipment);
        return R.ok();
    }

    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody EquipmentEntity equipment, HttpServletRequest request){
        equipmentService.insert(equipment);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody EquipmentEntity equipment, HttpServletRequest request){
        equipmentService.updateById(equipment);
        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        equipmentService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}


package com.controller;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.*;
import com.service.*;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.*;


@RestController
@RequestMapping("/course")
public class CourseController {
    @Autowired
    private CourseService courseService;

    @Autowired
    private YonghuService yonghuService;

    @Autowired
    private TeacherService teacherService;

    @Autowired
    private FenleiService fenleiService;


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, CourseEntity course,
                  HttpServletRequest request){
        EntityWrapper<CourseEntity> ew = new EntityWrapper<CourseEntity>();
        if(request.getSession().getAttribute("role").toString().equals("教练")) {
            ew.eq("teacherid",(Long)request.getSession().getAttribute("userId"));
        }
        if(request.getSession().getAttribute("role").toString().equals("会员")) {
            Long yonghuid=(Long)request.getSession().getAttribute("userId");
            YonghuEntity yonghuEntity=yonghuService.selectById(yonghuid);
        }
		PageUtils page = courseService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, course), params), params));
        for(int i=0;i<page.getList().size();i++){
            CourseEntity courseEntity= (CourseEntity) page.getList().get(i);
            TeacherEntity teacherEntity=teacherService.selectById(courseEntity.getTeacherid());
            courseEntity.setTeacherEntity(teacherEntity);
        }
        return R.ok().put("data", page);
    }

    /**
     * 查询所有
     * @param request
     * @return
     */
    @RequestMapping("/findAll")
    public R findAll(HttpServletRequest request) {
        EntityWrapper<CourseEntity> ew = new EntityWrapper<CourseEntity>();
        List<CourseEntity> courseEntityList=courseService.selectList(ew);
        return R.ok().put("data", courseEntityList);
    }

    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params, CourseEntity course, HttpServletRequest request){
        EntityWrapper<CourseEntity> ew = new EntityWrapper<CourseEntity>();
		PageUtils page = courseService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, course), params), params));
        return R.ok().put("data", page);
    }

    /**
     * 前端智能排序
     */
    @IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,CourseEntity courseEntity, HttpServletRequest request,String pre){
        EntityWrapper<CourseEntity> ew = new EntityWrapper<CourseEntity>();
        Map<String, Object> newMap = new HashMap<String, Object>();
        Map<String, Object> param = new HashMap<String, Object>();
        Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry<String, Object> entry = it.next();
            String key = entry.getKey();
            String newKey = entry.getKey();
            if (pre.endsWith(".")) {
                newMap.put(pre + newKey, entry.getValue());
            } else if (StringUtils.isEmpty(pre)) {
                newMap.put(newKey, entry.getValue());
            } else {
                newMap.put(pre + "." + newKey, entry.getValue());
            }
        }
        params.put("order", "desc");
        PageUtils page = courseService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, courseEntity), params), params));
        return R.ok().put("data", page);
    }


    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        CourseEntity course = courseService.selectById(id);
        TeacherEntity teacherEntity=teacherService.selectById(course.getTeacherid());
        course.setTeacherEntity(teacherEntity);
        return R.ok().put("data", course);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        CourseEntity course = courseService.selectById(id);
        TeacherEntity teacherEntity=teacherService.selectById(course.getTeacherid());
        course.setTeacherEntity(teacherEntity);
        return R.ok().put("data", course);
    }


    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody CourseEntity course, HttpServletRequest request){
        if(request.getSession().getAttribute("role").toString().equals("教练")) {
            course.setTeacherid((Long)request.getSession().getAttribute("userId"));
        }
        courseService.insert(course);
        return R.ok();
    }

    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody CourseEntity course, HttpServletRequest request){
        courseService.insert(course);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody CourseEntity course, HttpServletRequest request){
        courseService.updateById(course);
        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        courseService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}

你可能感兴趣的:(JAVA项目,java,spring,boot,mybatis,vue,mysql)