基于springboot健身俱乐部会员管理系统源码和论文
健身房现在已经不是一个陌生的词汇了,对于广大的人民来说它是一种必然和必要的存在。而计算机的技术也在飞速的发展,在双重推力的促进之下,健身房不能只是单纯的传统企业闭门造车,而是要结合现今的技术和科技。无论从商家的角度还是从用户的角度来说,从商家的角度来讲商家可以通过信息化之后的系统更便捷方便准确地管理用户的诸多信息,从用户的角度来说,不仅仅可以提高时效性,更可以保证他的个人信息的安全,开发一个线上课程报名和预约教练和场所的健身房管理系统是必要的。
首先,我研究了当前流行的开发框架和热门语言,采用了基于Spring Boot框架,采用Ajax、Thymeleaf等技术,采用MySQL5.7数据库进行系统开发,并采用Java语言进行编程;最后实现了一个具有课程管理、预约教练和场所、课程报名、教练管理、会员管理、通知管理、会员卡管理、课程管理等功能的健身房管理系统。为健身房管理提供一个管理会员信息,面向会员销售的管理系统,实现健身房的科学化管理。
关键词:健身 俱乐部 ?Spring Boot ?Ajax
【628】基于springboot健身俱乐部会员管理系统源码和论文
ABSTRACT
Gymnasium is no longer a strange word. It is an inevitable and necessary existence for the majority of people. And the computer technology is also developing rapidly. With the promotion of dual thrust, the gym can not only be a traditional enterprise, but also combine the current technology and science. Whether from the perspective of businesses or users, from the perspective of businesses, businesses can more conveniently and accurately manage users' information through the system after informatization. From the perspective of users, it can not only improve timeliness, but also ensure the safety of their personal information. It is necessary to develop a gym management system for online purchase of courses and appointment of coaches.
First of all, I studied the current popular development framework and popular languages. I used the Spring Boot framework, Ajax, Thymeleaf and other technologies, MySQL 5.7 database for system development, and Java language for programming; Finally, a gym management system with the functions of course management, appointment of coaches, purchase of courses, coach management, member management, notification management, membership card management, course management, etc. is implemented. It provides a management system for managing member information and member sales for the gym management to realize scientific management of the gym.
Keyword: fitness club Spring Boot Ajax
package com.milotnt.controller;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.milotnt.pojo.EqOrder;
import com.milotnt.pojo.Equipment;
import com.milotnt.pojo.Member;
import com.milotnt.service.EqOrderService;
import com.milotnt.service.EquipmentService;
@Controller
@RequestMapping("/eqOrder")
public class EqOrderController {
@Autowired
private EqOrderService eqOrderService;
@Autowired
private EquipmentService equipmentService;
//查询器材预约情况
@RequestMapping("/selEqOrder")
public String selectEqOrder(String date, String time, Model model, HttpSession session) {
//~~~~~~~~~~~~~~
//封装参数
EqOrder seat = new EqOrder();
if (date == null || date.length() == 0) {
//2023-05-08 为的是查询当天的全部
seat.setEqdate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
} else {
seat.setEqdate(date);
}
if (time == null || time.length() == 0) {
//seat.setEqBegin("08点-12点");
} else {
seat.setEqBegin(time);
}
List<EqOrder> equipmentList = eqOrderService.findAll(seat);
session.setAttribute("equipmentList", equipmentList);
model.addAttribute("equipmentList", equipmentList);
return "selectEqOrder";
}
//查询器材预约情况
@RequestMapping("/selEqOrder1")
public String selectEqOrder1(String date, String time, Model model, HttpSession session) {
//~~~~~~~~~~~~~~
EqOrder seat = new EqOrder();
if (date == null || date.length() == 0) {
seat.setEqdate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
} else {
seat.setEqdate(date);
}
if (time == null || time.length() == 0) {
//seat.setEqBegin("08点-12点");
} else {
seat.setEqBegin(time);
}
List<EqOrder> equipmentList = eqOrderService.findAll(seat);
session.setAttribute("equipmentList", equipmentList);
model.addAttribute("equipmentList", equipmentList);
return "selectEqOrder1";
}
//跳转至管理员场所和器材预约管理
@RequestMapping("/selEqOrderAdmin")
public String selectEqOrderAdmin(String date, String time, Model model, HttpSession session) {
EqOrder seat = new EqOrder();
if (date == null || date.length() == 0) {
seat.setEqdate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
} else {
seat.setEqdate(date);
}
if (time == null || time.length() == 0) {
seat.setEqBegin("08点-12点");
} else {
seat.setEqBegin(time);
}
List<EqOrder> equipmentList = eqOrderService.findAll(seat);
session.setAttribute("equipmentList", equipmentList);
model.addAttribute("equipmentList", equipmentList);
return "selectEqOrderAdmin";
}
//查询场所
@RequestMapping("/selEquipmentForUser")
public String selEquipmentForUser(Model model, HttpSession session) {
Map<String, String> params = new HashMap<String, String>();
params.put("equipmentStatus", "正常");
List<Equipment> equipmentList = equipmentService.findAll();
session.setAttribute("equipmentList", equipmentList);
model.addAttribute("equipmentList", equipmentList);
return "selectEquipmentForUser";
}
//跳转修改器材页面
@RequestMapping("/toyuyueEquipment")
public String toyuyueEquipment(Integer equipmentId, Model model, HttpSession session) {
Member member = (Member) session.getAttribute("user");
model.addAttribute("member", member);
Integer memberAccount = member.getMemberAccount();
List<EqOrder> equipmentList = eqOrderService.selectEqOrderByMemberAccount(memberAccount);
model.addAttribute("equipmentList", equipmentList);
return "yuyueEquipment";
}
//跳转修改器材页面
@RequestMapping("/yuyueEquipment")
public String yuyueEquipment(Integer eqOrderId, Model model, HttpSession session) {
Member member = (Member) session.getAttribute("user");
String memberName = member.getMemberName();
Integer memberAccount = member.getMemberAccount();
EqOrder eqOrder = eqOrderService.selectBYid(eqOrderId);
eqOrder.setMemberAccount(memberAccount);
eqOrder.setMemberName(memberName);
eqOrder.setStatus("已预约");
eqOrderService.updateEqOrder(eqOrder);
return "redirect:toyuyueEquipment";
}
//跳转修改器材页面
@RequestMapping("/yuyueXiaofeiEquipment")
public String yuyueXiaofeiEquipment(Integer eqOrderId, Model model) {
EqOrder eqOrder = eqOrderService.selectBYid(eqOrderId);
eqOrder.setStatus("已到店");
eqOrderService.updateEqOrder(eqOrder);
return "redirect:selEqOrderAdmin";
}
//跳转修改器材页面
@RequestMapping("/yuyueShuangyueEquipment")
public String yuyueShuangyueEquipment(Integer eqOrderId, Model model) {
EqOrder eqOrder = eqOrderService.selectBYid(eqOrderId);
eqOrder.setStatus("爽约");
eqOrderService.updateEqOrder(eqOrder);
return "redirect:selEqOrderAdmin";
}
//新增器材
@RequestMapping("/addEquipment")
public String addEquipment(Equipment equipment) {
equipment.setEquipmentStatus("正常");
equipmentService.insertEquipment(equipment);
return "redirect:toyuyueEquipment";
}
@RequestMapping("/totalBystatus1")
public String TotalBystatus1(Model model) {
return "totalBystatus";
}
@RequestMapping("/totalBystatus")
@ResponseBody
public List<EqOrder> TotalBystatus(Model model) {
List<EqOrder> equipmentList = eqOrderService.TotalBystatus();
return equipmentList;
}
@RequestMapping("/TotalByEq1")
public String TotalByEq1(Model model) {
return "totalByEq";
}
@RequestMapping("/TotalByEq")
@ResponseBody
public List<EqOrder> TotalByEq(Model model) {
List<EqOrder> equipmentList = eqOrderService.TotalByEq();
return equipmentList;
}
@RequestMapping("/TotalByEqBegin1")
public String TotalByEqBegin1(Model model) {
return "TotalByEqBegin";
}
@RequestMapping("/TotalByEqBegin")
@ResponseBody
public List<EqOrder> TotalByEqBegin(Model model) {
List<EqOrder> equipmentList = eqOrderService.TotalByEqBegin();
return equipmentList;
}
}
?
package com.milotnt.controller;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.milotnt.pojo.Admin;
import com.milotnt.pojo.Employee;
import com.milotnt.pojo.Member;
import com.milotnt.service.AdminService;
import com.milotnt.service.EmployeeService;
import com.milotnt.service.EquipmentService;
import com.milotnt.service.MemberService;
@Controller
public class LoginController {
@Autowired
private MemberService memberService;
@Autowired
private AdminService adminService;
@Autowired
private EmployeeService employeeService;
@Autowired
private EquipmentService equipmentService;
//主页、跳转管理员登录页面
@RequestMapping("/")
public String toAdminLogin() {
return "adminLogin";
}
//跳转会员登录页面
@RequestMapping("/toUserLogin")
public String toUserLogin() {
return "userLogin";
}
//跳转员工登录页面
@RequestMapping("/toEmployeeLogin")
public String toEmployeeLogin() {
return "employeeLogin";
}
//获取session中的account
public final String getAccountFromSession(HttpSession session) {
return session.getAttribute("account").toString();
}
//管理员登录
@RequestMapping("/adminLogin")
public String adminLogin(Admin admin, Model model, HttpSession session) {
//调用业务对象执行管理员登录功能,并获取返回值
Admin admin1 = adminService.adminLogin(admin);
if (admin1 != null) {
// 向session对象中完成数据的绑定(全局的)
// model.addAttribute("account", admin1.getAdminAccount());
// 在session对象中完成数据的绑定(全局的)
session.setAttribute("account", admin1.getAdminAccount());
System.out.println(getAccountFromSession(session));
//会员人数
Integer memberTotal = memberService.selectTotalCount();
model.addAttribute("memberTotal", memberTotal);
session.setAttribute("memberTotal", memberTotal);
//员工人数
Integer employeeTotal = employeeService.selectTotalCount();
model.addAttribute("employeeTotal", employeeTotal);
session.setAttribute("employeeTotal", employeeTotal);
//健身房总人数
Integer humanTotal = memberTotal + employeeTotal;
model.addAttribute("humanTotal", humanTotal);
session.setAttribute("humanTotal", humanTotal);
//器材数
Integer equipmentTotal = equipmentService.selectTotalCount();
model.addAttribute("equipmentTotal", equipmentTotal);
session.setAttribute("equipmentTotal", equipmentTotal);
return "adminMain";
// return "redirect:/adminMain.html";
}
model.addAttribute("msg", "您输入的账号或密码有误,请重新输入!");
return "adminLogin";
}
//会员登录
@RequestMapping("/userLogin")
public String userLogin(Member member, Model model, HttpSession session) {
Member member1 = memberService.userLogin(member);
if (member1 != null) {
model.addAttribute("member", member1);
session.setAttribute("user", member1);
return "userMain";
}
model.addAttribute("msg", "您输入的账号或密码有误,请重新输入!");
return "userLogin";
}
//员工登录
@RequestMapping("/employeeLogin")
public String employeeLogin(Employee employee, Model model, HttpSession session) {
Employee member1 = employeeService.selectByAccountAndPassword(employee);
if (member1 != null) {
model.addAttribute("employee", member1);
session.setAttribute("employee", member1);
return "employeeMain";
}
model.addAttribute("msg", "您输入的账号或密码有误,请重新输入!");
return "employeeLogin";
}
//跳转管理员主页
// @RequestMapping("/toAdminMain")
// public String toAdminMain(Model model, HttpSession session) {
// Integer memberTotal = (Integer) session.getAttribute("memberTotal");
// Integer employeeTotal = (Integer) session.getAttribute("employeeTotal");
// Integer humanTotal = (Integer) session.getAttribute("humanTotal");
// Integer equipmentTotal = (Integer) session.getAttribute("equipmentTotal");
// model.addAttribute("memberTotal", memberTotal);
// model.addAttribute("employeeTotal", employeeTotal);
// model.addAttribute("humanTotal", humanTotal);
// model.addAttribute("equipmentTotal", equipmentTotal);
// return "adminMain";
// }
//跳转会员主页
@RequestMapping("/toUserMain")
public String toUserMain(Model model, HttpSession session) {
Member member = (Member) session.getAttribute("user");
model.addAttribute("member", member);
return "userMain";
}
}
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!