基于SpringBoot+Redis的健身俱乐部会员综合管理系统

一个最近开发的健身俱乐部会员综合管理系统发布出来

本系统是由JSP开发的,主要从系统管理、会员管理、会员健身管理、会员卡分类管理、会员信息管理、器材管理、工作人员管理、执教教练管理、等模块进行了详细的设计与实现

基于SpringBoot+Redis的健身俱乐部会员综合管理系统mysql数据源javaweb在线考试系统-javaEE在线考试系统
1.包含源程序,数据库脚本。代码和数据库脚本都有详细注释。
2.课题设计仅供参考学习使用,可以在此基础上进行扩展完善

 代码已经上传github,下载地址https://github.com/21503882/gym-club
开发环境:
Eclipse ,MYSQL,JDK1.8,Tomcat 8.5
涉及技术点:
MVC模式、SpringBoot、Mybatis、Redis、HTML、log4j、druid、Bootstrap、
Semantic UI、Thymeleaf、JavaScript、CSS、JQUERY、Ajax等
适合学习J2EE的一段时间的熟手,代码思路清晰,注解详细,数据库用的是mysql5.1,服务器用的tomcat8.5,JDK版本1.8. 编程软件Eclispe J2EE版本。是典型MVC架构,并且前后台分离
主要功能:

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

基于SpringBoot+Redis的健身俱乐部会员综合管理系统

package cn.edu.scau.logistics.controller;
 
import java.util.List;
 
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
 
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
 
import cn.edu.scau.logistics.entity.Car;
import cn.edu.scau.logistics.entity.Driver;
import cn.edu.scau.logistics.entity.Worker;
import cn.edu.scau.logistics.services.interfaces.CarService;
import cn.edu.scau.logistics.services.interfaces.WorkerService;
import cn.edu.scau.logistics.util.Page;
 
@Controller
@RequestMapping("/car")
public class CarController {
    @Resource
    private CarService carService;
    @Resource
    private WorkerService workerService;
    /**
     * 跳转到添加信息界面
     * @return
     * @throws Exception
     */
    @RequestMapping("/goAddCar")
    public String goAddCar(Model model)throws Exception{
        List<Driver> driver = workerService.findAllDriver();
        model.addAttribute("driver", driver);
        return "car/addCar";
    }
    
    /**
     * 跳转到更新页面
     * @param 
     * @param model
     * @return
     * @throws Exception
     */
    @RequestMapping(value="/goUpdate/{carId}")
    public String goUpdate(@PathVariable("carId") int carId ,Model model)throws Exception{
        Car car = carService.findById(carId);
        List<Driver> driver = workerService.findAllDriver();
        model.addAttribute("driver", driver);
        model.addAttribute("car",car);
        return "car/updateCar";
    }
    
    /**
     * 添加或修改信息
     * @param worker
     * @return
     */
    @RequestMapping("/save")
    public String saveCar(Car car,HttpServletRequest request,Model model)throws Exception{
        if(request.getParameter("carDriver")!=null){
            int workId = Integer.parseInt(request.getParameter("carDriver"));
            Worker worker = workerService.findByid(workId);
            car.setWorkId(workId);
            car.setCarDriver(worker.getWorkName());
            
        }
    
        if(car.getCarId() == 0){
            carService.addCar(car);
        }
        else{
            carService.update(car);
        }
        return "redirect:/car/findCar";
    }
    /**
     * 分页查询
     * @param info
     * @param current
     * @param model
     * @return
     */
    @RequestMapping("/findCar")
    public String findCar(String info,Integer current,Model model){
        if( current == null )
            current = 1;
        Page page = carService.queryCar(info, current);
        model.addAttribute("page",page);
        return "car/queryCar";
    }
    
    /**
     * 删除信息
     * @param cid
     * @return
     * @throws Exception
     */
    @RequestMapping(value= "/deleteCar" , method = RequestMethod.POST)
    public @ResponseBody int deleteCar (int carId) throws Exception{
        int flag = 0;
        flag =carService.deleteCar(carId);
        if(flag != 0)
        return 1;
        else 
        return 0;
    }
    
    /**
     * 获取查询信息
     * @param request
     * @param model
     * @return
     * @throws Exception
     */
    @RequestMapping("/findByInfo")
    public String findByInfo (HttpServletRequest request,ModelMap model)throws Exception{
        String info = request.getParameter("queryCar");
        model.put("info", info);
        return "redirect:/car/findCar";
    }
    
    
}
 

package cn.edu.scau.logistics.controller;
 
 
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
 
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
 
import cn.edu.scau.logistics.entity.UserEntity;
import cn.edu.scau.logistics.services.interfaces.UserService;
import cn.edu.scau.logistics.util.Page;
@Controller
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserService userService;
    /**
     * 登录功能
     * @param user
     * @param request
     * @return
     * @throws Exception
     */
    @RequestMapping("/login")
    public String login(UserEntity user,HttpServletRequest request,Model model)throws Exception{
        System.out.println(user.getAccount() +" "+user.getUserPassword());
            UserEntity resultUser = userService.login(user);
            if(resultUser == null){
                request.setAttribute("user", resultUser);
                request.setAttribute("errorMsg", "用户或者密码错误");
                return "/login";    
            }
            else{
                HttpSession session = request.getSession();
                session.setAttribute("currenUser", resultUser);
                model.addAttribute("resultUser", resultUser);
                return "/main";
            }
            
    }
    
    @RequestMapping("/logout")
    public String logout(){
        return "/login";
    }
    
    
    /**
     * 跳转到添加新用户界面
     * @return
     */
    @RequestMapping("/goAddUser")
    public String goAddUser()throws Exception{
        return "/user/addUser";
    }
    @RequestMapping(value="/goUpdate/{uid}")
    public String goUpdate(@PathVariable("uid") int uid ,Model model)throws Exception{
        UserEntity user = userService.findUserById(uid);
        model.addAttribute("user",user);
        return "user/updateUser";
    }
    
    
    /**
     * 添加用户或者修改功能
     * @param user
     * @return
     * @throws Exception
     */
    @RequestMapping("/save")
    public String  addUser(UserEntity user,HttpServletRequest request)throws Exception{
        user.setRole(request.getParameter("selectRole"));
        System.out.println(user.toString());
        if(user.getUserId() == 0){
            
            userService.addUser(user);
        }
        else{
            userService.updateUser(user);
        }
            return "redirect:/user/findUser";
    }
    
    /**
     * 验证是否已经存在用户
     * @param account
     * @return
     */
    @RequestMapping(value="/checkAccount",method = RequestMethod.POST)
    public @ResponseBody int checkAccount(String account) throws Exception{
        UserEntity resultAccount = userService.findAccount(account);
        if(resultAccount == null)
            return 1;
        else
            return 0;
    }
    
    /**
     * 分页查询
     * 
     */
    @RequestMapping("/findUser")
    public String findUser(Integer current,Model model,String info)throws Exception{
        if( current == null )
            current = 1;
        Page page = userService.queryAllUser(info,current);
        System.out.println(page.toString());
        model.addAttribute("page",page);
        return "user/queryUser";
    }
    /**
     * 删除用户功能
     * @param uid
     * @return
     */
    @RequestMapping(value= "/deleteUser" , method = RequestMethod.POST)
    public @ResponseBody int  deleteUser( int uid ) throws Exception{
        int flag = 0;
        flag = userService.deleteUser(uid);
        if(flag != 0)
        return 1;
        else 
        return 0;
    }
    
    /**
     * 获取查询信息
     * @param request
     * @param model
     * @return
     * @throws Exception
     */
    @RequestMapping("/findByInfo")
    public String findByInfo (HttpServletRequest request,ModelMap model)throws Exception{
        String info = request.getParameter("queryUser");
        model.put("info", info);
        
        return "redirect:/user/findUser";
    }
    
    
}
 代码已经上传github,下载地址https://github.com/21503882/gym-club

器材管理主要包括器材类别设置、器材进货入库、现有器材信息、库存信息、器材等模块。该模块主要是对器材信息的一些操作,器材类别设置主要设置器材的类型名称。器材进货是对器材进货信息的添加、删除、保存等功能的实现。同时把所添加的记录直接能够保存到库存表中,并能改变库存表中的库存总量。现有器材信息模块实现的是通过查询条件,把所查询的器材显示到数据窗口中,能够让管理人员非常直观的看到库存中的器材信息