基于javaweb+jsp的健身房信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的健身房信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
技术框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Layui Ajax
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
登录、注册、退出、用户模块、公告模块、教练模块、课程模块、设备模块、会员模块的增删改查管理
* @param request* @throws IOException*/@RequestMapping("coachDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = Util.decode(request, "id");coachService.delete(Arrays.asList(id));this.redirectList(request, response);}/*** 编辑教练** @param response* @param request* @throws IOException*/@RequestMapping("coachEdit")public void edit(HttpServletResponse response, HttpServletRequest request) throws IOException {Coach vo = new Coach();vo.setId(Long.valueOf(Util.decode(request, "id")));vo.setCoachName(Util.decode(request, "coachName"));vo.setCoachSex(Util.decode(request, "coachSex"));vo.setCoachAge(Util.decode(request, "coachAge"));vo.setCoachPhone(Util.decode(request, "coachPhone"));vo.setCoachText(Util.decode(request, "coachText"));coachService.update(vo);
</div>
<script src="js/layui/layui.js"/>
<script>//JavaScript代码区域layui.use('element', function () {let element = layui.element;});
</script>
<script type="text/html" id="myToolbar"><div class="layui-btn-container"><c:if test="${loginUser.userType == '管理员'}"><button class='layui-btn layui-btn-sm' lay-event='add'>添加</button></c:if></div>
</script>
<script>function arrayBufferToBase64(buffer) {let binary = '';let bytes = new Uint8Array(buffer);let len = bytes.byteLength;for (let i = 0; i < len; i++) {
}}if (session.getAttribute("loginUser") == null) {session.setAttribute("alert_msg", "错误:请先登录!");response.sendRedirect("login.jsp");return false;}return true;}//@Overridepublic void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {}//@Override
}/*** 删除教练** @param response* @param request* @throws IOException*/@RequestMapping("coachDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = Util.decode(request, "id");coachService.delete(Arrays.asList(id));this.redirectList(request, response);
1=1</where></select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="com.demo.dao.MemberMapper"><resultMap id="BaseResultMap" type="com.demo.vo.Member" ><result column="id" property="id" /><result column="member_name" property="memberName" /><result column="member_sex" property="memberSex" /><result column="member_phone" property="memberPhone" /><result column="member_email" property="memberEmail" /><result column="member_address" property="memberAddress" /></resultMap>
vo.setEquipmentText(Util.decode(request, "equipmentText"));equipmentService.update(vo);this.redirectList(request, response);}/*** 获取设备的详细信息(详情页面与编辑页面要显示该设备的详情)并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping({"equipmentGet", "equipmentEditPre"})public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = Util.decode(request, "id");//取出主键idEquipment vo = equipmentService.get(id);
</ul></c:if></div><div class="layui-side layui-bg-black"><div class="layui-side-scroll"><ul class="layui-nav layui-nav-tree" lay-filter="test"><!-- 侧边栏 --><jsp:include page="menu.jsp"><jsp:param value="active" name="Course_active"/></jsp:include></ul></div></div>
Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)params.put("searchColumn", searchColumn);//要查询的列params.put("keyword", keyword);//查询的关键字response.getWriter().println(com.alibaba.fastjson.JSONObject.toJSONString(memberService.list(params).get("list")));}
}
package com.demo.controller;import com.demo.util.Util;
import com.demo.service.EquipmentService;
import com.demo.vo.Equipment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
layui.use('element', function () {let element = layui.element;});
</script>
<script type="text/html" id="myToolbar"><div class="layui-btn-container"><c:if test="${loginUser.userType == '管理员'}"><button class='layui-btn layui-btn-sm' lay-event='add'>添加</button></c:if></div>
</script>
<script>function arrayBufferToBase64(buffer) {let binary = '';let bytes = new Uint8Array(buffer);let len = bytes.byteLength;for (let i = 0; i < len; i++) {binary += String.fromCharCode(bytes[i]);}return window.btoa(binary);}layui.use('table', function () {
}
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><title>健身房信息管理系统</title><link rel="stylesheet" href="js/layui/css/layui.css"><script src="js/jquery.js"></script><script src="js/layer.js"></script>
// 将验证码保存在session对象中,key为validation_codesession.setAttribute("validationCode", validationCode.toString());g.dispose();// 关闭Graphics对象OutputStream os = response.getOutputStream();ImageIO.write(image, "JPEG", os);// 以JPEG格式向客户端发送图形验证码}@RequestMapping("authResetPassword")public void resetPassword(HttpServletResponse response, HttpServletRequest request) throws IOException, ServletException {String msg;User loginUser = (User) request.getSession().getAttribute("loginUser");String oldPassword = Util.decode(request, "oldPassword");if (!loginUser.getPassword().equals(oldPassword)) {msg = "原密码错误!";} else {String newPassword = Util.decode(request, "newPassword");loginUser.setPassword(newPassword);this.userService.update(loginUser);
import com.demo.util.Util;
import com.demo.service.NoticeService;
import com.demo.vo.Notice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;@Controller
@RequestMapping
} else {//layer.alert('这是工具栏右侧自定义的一个图标按钮');}});//搜索let $ = layui.$, active = {reload: function () {let url = 'courseList?keyword=' + $('#search_keyword').val() + '&searchColumn=' + $('#searchColumn').val();//执行重载table.reload('myTable', {url: url,page: {curr: 1 //重新从第 1 页开始}});
</delete><!--修改--><update id="doUpdate" parameterType="com.demo.vo.Member">UPDATE `t_member`<set><if test ='id != null'>`id` = #{id},</if><if test ='memberName != null'>`member_name` = #{memberName},</if><if test ='memberSex != null'>`member_sex` = #{memberSex},</if><if test ='memberPhone != null'>`member_phone` = #{memberPhone},</if><if test ='memberEmail != null'>`member_email` = #{memberEmail},</if><if test ='memberAddress != null'>`member_address` = #{memberAddress}</if></set>WHERE `id` = #{id}</update><!--获取--><select id="findById" resultMap="BaseResultMap">SELECT <include refid="Base_Column_List" /> FROM `t_member` WHERE `id` = #{id}</select><!--列表--><select id="findAllSplit" parameterType="java.util.Map" resultMap="BaseResultMap">
public String getUserSex() {return userSex;}public void setUserSex(String userSex) {this.userSex = userSex;}public String getUserPhone() {return userPhone;}public void setUserPhone(String userPhone) {this.userPhone = userPhone;}public String getUserText() {return userText;}public void setUserText(String userText) {
defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可title: '提示',layEvent: 'LAYTABLE_TIPS',icon: 'layui-icon-tips'}],title: '会员列表',cols: [[{field: 'memberName',title: '姓名',templet: vo => (vo = vo.memberName) ? '<a href="#" style="color: #009688;">' + vo + '</a>' : '',event: 'info',},{
*/
public class User implements Serializable {private Long id;//主键private String username;//用户名private String password;//密码private String realName;//姓名private String userSex;//性别:男/女private String userPhone;//手机private String userText;//备注private String userType;//类型:管理员/普通用户public Long getId() {return id;}public void setId(Long id) {this.id = id;}public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}public String getPassword() {return password;
基于javaweb+jsp的健身房信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)相关推荐
- 基于javaweb+jsp的服装店门店信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的服装店门店信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax) JavaWeb JavaBean JSP ...
- 基于javaweb+jsp的宠物领养信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的宠物领养信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax) JavaWeb JavaBean JSP M ...
- 基于javaweb+jsp的手机店销售信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的手机店销售信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax) 运行环境 Java≥8.MySQL≥5.7 ...
- 基于javaweb+jsp的企业车辆管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的企业车辆管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax) JavaWeb JavaBean JSP MVC ...
- 基于javaweb+jsp的个人日记管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的个人日记管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax) JavaWeb JavaBean JSP MVC ...
- 基于javaweb+jsp的二手物品交易管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的二手物品交易管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax) JavaWeb JavaBean JSP M ...
- 基于javaweb+jsp的饮食营养健康管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的饮食营养健康管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax) JavaWeb JavaBean JSP M ...
- 基于javaweb+jsp的访客管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的访客管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax) JavaWeb JavaBean JSP MVC M ...
- 基于javaweb+jsp的医院住院管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的医院住院管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax) 运行环境 Java≥8.MySQL≥5.7.To ...
最新文章
- asp.net MVC2 Jquery
- 气体润滑轴承matlab分析,气体润滑轴承的研究与发展
- html性别选项卡,html选项卡
- Android 5.1 - 状态栏充电标志问题
- 在mysql中加载并执行sql文件
- Nachos Lab2 虚拟内存
- 信息论与编码之信源编码详解
- QQ牧场接口协议分析
- 网站或APP小程序调用短信验证码接口的流程
- Android 11.0 12.0强制app横屏显示
- Google中Gson的巧妙使用 —————— 开开开山怪
- 点线特征融合求取相机位姿
- java给图片、word、ppt、excel、pdf添加水印
- linux下编译和安装log4cxx,Linux下log4cxx的安装使用
- 计算机数据表格展示,利用工具,一分钟完成数据可视化,快速输出美观的数据图表...
- 三万字,100题!Linux知识汇总!
- 初学Linux RHEL时遇到的系列问题和解决方案
- vue-router 源码和动态路由权限分配
- 南怀瑾 100句 渺小_让我们与tinyGo一起变得渺小
- 请java老鸟指教一下