收藏关注不迷路!!
🌟文末获取源码+数据库🌟
感兴趣的可以先收藏起来,还有大家在毕设选题(免费咨询指导选题),项目以及论文编写等相关问题都可以给我留言咨询,希望帮助更多的人
文章目录
摘要
本健身俱乐部网站系统是针对目前健身俱乐部网站的实际需求,从实际工作出发,对过去的健身俱乐部网站系统存在的问题进行分析,完善用户的使用体会。采用计算机系统来管理信息,取代人工管理模式,查询便利,信息准确率高,节省了开支,提高了工作的效率。
本系统结合计算机系统的结构、概念、模型、原理、方法,在计算机各种优势的情况下,采用目前最流行的SSM 框架和 Eclipse 编辑器、MySQL 数据库设计 并实现的。本健身俱乐部网站系统主要包括系统用户管理、新闻数据管理、用户管理、教练管理、器材管理、教室管理、课程安排管理、选课管理、课程管理、会员卡管理、办卡管理等多个模块。它帮助健身俱乐部网站实现了信息化、网络化,通过测试,实现了系统设计目标,相比传统的管理模式,本系统合理的利用了健身俱乐部网站数据资源,有效的减少了健身俱乐部网站的经济投入,大大提高了健身俱乐部网站的效率。
关键词:健身俱乐部网站;SSM框架;MySQL数据库
一、开发技术介绍
- SSM
- MySQL
- JSP
二、功能介绍
通过软件的需求分析已经获得了系统的基本功能需求,根据需求,将健身俱乐部网站系统功能模块主要分为管理员模块、用户模块。管理员添加课程种类、教练、课程、器材管理、教室等信息,用户可以进入网站,实现课程安排、添加办卡、添加选课等。如图4.1是系统的功能结构图。
三、代码展示
package com.controller;
import java.io.File;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.io.PrintWriter;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.entity.Youqinglianjie;
import com.server.YouqinglianjieServer;
import com.util.PageBean;
import net.sf.json.JSONObject;
import com.util.db;
import java.sql.SQLException;
import java.sql.*;
@Controller
public class YouqinglianjieController {
@Resource
private YouqinglianjieServer youqinglianjieService;
@RequestMapping("addYouqinglianjie.do")
public String addYouqinglianjie(HttpServletRequest request,Youqinglianjie youqinglianjie,HttpSession session) throws SQLException{
Timestamp time=new Timestamp(System.currentTimeMillis());
youqinglianjie.setAddtime(time.toString().substring(0, 19));
youqinglianjieService.add(youqinglianjie);
session.setAttribute("backxx", "添加成功");
session.setAttribute("backurl", request.getHeader("Referer"));
//session.setAttribute("backurl", "youqinglianjieList.do");
return "redirect:postback.jsp";
//return "redirect:youqinglianjieList.do";
}
// 处理编辑
@RequestMapping("doUpdateYouqinglianjie.do")
public String doUpdateYouqinglianjie(int id,ModelMap map,Youqinglianjie youqinglianjie){
youqinglianjie=youqinglianjieService.getById(id);
map.put("youqinglianjie", youqinglianjie);
return "youqinglianjie_updt";
}
// 后台详细
@RequestMapping("youqinglianjieDetail.do")
public String youqinglianjieDetail(int id,ModelMap map,Youqinglianjie youqinglianjie){
youqinglianjie=youqinglianjieService.getById(id);
map.put("youqinglianjie", youqinglianjie);
return "youqinglianjie_detail";
}
// 前台详细
@RequestMapping("yqljDetail.do")
public String yqljDetail(int id,ModelMap map,Youqinglianjie youqinglianjie){
youqinglianjie=youqinglianjieService.getById(id);
map.put("youqinglianjie", youqinglianjie);
return "youqinglianjiedetail";
}
//
@RequestMapping("updateYouqinglianjie.do")
public String updateYouqinglianjie(int id,ModelMap map,Youqinglianjie youqinglianjie,HttpServletRequest request,HttpSession session){
youqinglianjieService.update(youqinglianjie);
session.setAttribute("backxx", "修改成功");
session.setAttribute("backurl", request.getHeader("Referer"));
return "redirect:postback.jsp";
//String url = request.getHeader("Referer");
//return "redirect:"+url;
//return "redirect:youqinglianjieList.do";
}
// 分页查询
@RequestMapping("youqinglianjieList.do")
public String youqinglianjieList(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Youqinglianjie youqinglianjie, String wangzhanmingcheng, String wangzhi, String LOGO){
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), 5);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", 5);
if(wangzhanmingcheng==null||wangzhanmingcheng.equals("")){pmap.put("wangzhanmingcheng", null);}else{pmap.put("wangzhanmingcheng", wangzhanmingcheng);}
if(wangzhi==null||wangzhi.equals("")){pmap.put("wangzhi", null);}else{pmap.put("wangzhi", wangzhi);}
if(LOGO==null||LOGO.equals("")){pmap.put("LOGO", null);}else{pmap.put("LOGO", LOGO);}
int total=youqinglianjieService.getCount(pmap);
pageBean.setTotal(total);
List<Youqinglianjie> list=youqinglianjieService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "youqinglianjie_list";
}
@RequestMapping("yqljList.do")
public String yqljList(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Youqinglianjie youqinglianjie, String wangzhanmingcheng, String wangzhi, String LOGO){
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), 5);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", 5);
if(wangzhanmingcheng==null||wangzhanmingcheng.equals("")){pmap.put("wangzhanmingcheng", null);}else{pmap.put("wangzhanmingcheng", wangzhanmingcheng);}
if(wangzhi==null||wangzhi.equals("")){pmap.put("wangzhi", null);}else{pmap.put("wangzhi", wangzhi);}
if(LOGO==null||LOGO.equals("")){pmap.put("LOGO", null);}else{pmap.put("LOGO", LOGO);}
int total=youqinglianjieService.getCount(pmap);
pageBean.setTotal(total);
List<Youqinglianjie> list=youqinglianjieService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "youqinglianjielist";
}
@RequestMapping("deleteYouqinglianjie.do")
public String deleteYouqinglianjie(int id,HttpServletRequest request){
youqinglianjieService.delete(id);
String url = request.getHeader("Referer");
return "redirect:"+url;
//return "redirect:youqinglianjieList.do";
}
}
四、效果图
五 、源码获取
下方名片联系我即可!!
大家点赞、收藏、关注、评论啦 、查看👇🏻获取联系方式👇🏻