基于微信小程序的健身房私教预约系统+ssm后台源码和论文

自2014年底以来,体育产业政策红利接踵而至。在政府鼓励下,一系列体育产业政策出现,加之资本的投入使得优质的内容和商品大幅度的产生,以及居民健康意识的加强和参与大众体育的热情,使得体育产业进入了黄金发展期。大众健身作为体育产业的一部分,正如火如茶的发展。谈及健身领域,最重要的两个因素就是健身场地和教练管理,在互联网时代下,专业的健身商品也成为企业发展重要的桎梏。2016年6月3日国务院印发的《全面健身计划(2016-2020年)》中提到:“不断扩大的健身人群、支持市场涌现适合亚洲人的健身课程、专业教练管理培养机构、专业健身教练管理以及体验良好的健身场所。

健身房私教预约的设计主要是对系统所要实现的功能进行详细考虑,确定所要实现的功能后进行界面的设计,在这中间还要考虑如何可以更好的将功能及页面进行很好的结合,方便用户可以很容易明了的找到自己所需要的信息,还有系统平台后期的可操作性,通过对信息内容的详细了解进行技术的开发。

健身房私教预约的开发利用现有的成熟技术参考,以源代码为模板,分析功能调整与健身房私教预约的实际需求相结合,讨论了基于健身房私教预约的使用。 

关键词:健身房私教预约小程序微信开发者  JAVA 语言  mysql数据库

基于微信小程序的健身房私教预约系统+ssm后台源码和论文weixin062

演示视频:

基于微信小程序的健身房私教预约系统+ssm后台源码和论文

Abstract

Since the end of 2014, the policy dividend of sports industry has come one after another. Under the encouragement of the government, a series of sports industry policies appear, coupled with the capital investment, which makes the high-quality content and goods produced by a large margin, as well as the strengthening of residents' health awareness and the enthusiasm of participating in mass sports, which makes the sports industry enter a golden period of development. As a part of sports industry, mass fitness is just like the development of tea. When it comes to the field of fitness, the two most important factors are fitness venues and coach management. In the Internet era, professional fitness products have become an important shackle for the development of enterprises. In the comprehensive fitness plan (2016-2020) issued by the State Council on June 3, 2016, it is mentioned that "the growing number of fitness people, the emergence of fitness courses suitable for Asians in the support market, professional coach management and training institutions, professional fitness coach management and fitness places with good experience".

The design of gym private teaching appointment is mainly to consider the functions of the system in detail, and to design the interface after determining the functions to be realized. In the middle, we also need to consider how to better combine the functions and pages, so that users can easily find the information they need, and the operability of the system platform in the later stage Detailed understanding of the information content for technical development.

The development of gym private teaching appointment uses the existing mature technology reference, takes the source code as the template, analyzes the function adjustment and the actual needs of gym private teaching appointment, and discusses the use of gym private teaching appointment.  

Key words: gym private teaching booking applet; wechat Developer Java language MySQL database

 

package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;

import com.entity.HuiyuanEntity;
import com.entity.view.HuiyuanView;

import com.service.HuiyuanService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 会员
 * 后端接口
 * @author 
 * @email 
 * @date 2021-05-26 20:54:46
 */
@RestController
@RequestMapping("/huiyuan")
public class HuiyuanController {
    @Autowired
    private HuiyuanService huiyuanService;
    
	@Autowired
	private TokenService tokenService;
	
	/**
	 * 登录
	 */
	@IgnoreAuth
	@RequestMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		HuiyuanEntity user = huiyuanService.selectOne(new EntityWrapper<HuiyuanEntity>().eq("huiyuankahao", username));
		if(user==null || !user.getMima().equals(password)) {
			return R.error("账号或密码不正确");
		}
		String token = tokenService.generateToken(user.getId(), username,"huiyuan",  "会员" );
		return R.ok().put("token", token);
	}
	
	/**
     * 注册
     */
	@IgnoreAuth
    @RequestMapping("/register")
    public R register(@RequestBody HuiyuanEntity huiyuan){
    	//ValidatorUtils.validateEntity(huiyuan);
    	HuiyuanEntity user = huiyuanService.selectOne(new EntityWrapper<HuiyuanEntity>().eq("huiyuankahao", huiyuan.getHuiyuankahao()));
		if(user!=null) {
			return R.error("注册用户已存在");
		}
		Long uId = new Date().getTime();
		huiyuan.setId(uId);
        huiyuanService.insert(huiyuan);
        return R.ok();
    }
	
	/**
	 * 退出
	 */
	@RequestMapping("/logout")
	public R logout(HttpServletRequest request) {
		request.getSession().invalidate();
		return R.ok("退出成功");
	}
	
	/**
     * 获取用户的session用户信息
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){
    	Long id = (Long)request.getSession().getAttribute("userId");
        HuiyuanEntity user = huiyuanService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	HuiyuanEntity user = huiyuanService.selectOne(new EntityWrapper<HuiyuanEntity>().eq("huiyuankahao", username));
    	if(user==null) {
    		return R.error("账号不存在");
    	}
    	user.setMima("123456");
        huiyuanService.updateById(user);
        return R.ok("密码已重置为:123456");
    }


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,HuiyuanEntity huiyuan, 
		HttpServletRequest request){

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

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( HuiyuanEntity huiyuan){
       	EntityWrapper<HuiyuanEntity> ew = new EntityWrapper<HuiyuanEntity>();
      	ew.allEq(MPUtil.allEQMapPre( huiyuan, "huiyuan")); 
        return R.ok().put("data", huiyuanService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(HuiyuanEntity huiyuan){
        EntityWrapper< HuiyuanEntity> ew = new EntityWrapper< HuiyuanEntity>();
 		ew.allEq(MPUtil.allEQMapPre( huiyuan, "huiyuan")); 
		HuiyuanView huiyuanView =  huiyuanService.selectView(ew);
		return R.ok("查询会员成功").put("data", huiyuanView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        HuiyuanEntity huiyuan = huiyuanService.selectById(id);
        return R.ok().put("data", huiyuan);
    }

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



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody HuiyuanEntity huiyuan, HttpServletRequest request){
    	huiyuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(huiyuan);
    	HuiyuanEntity user = huiyuanService.selectOne(new EntityWrapper<HuiyuanEntity>().eq("huiyuankahao", huiyuan.getHuiyuankahao()));
		if(user!=null) {
			return R.error("用户已存在");
		}

		huiyuan.setId(new Date().getTime());
        huiyuanService.insert(huiyuan);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody HuiyuanEntity huiyuan, HttpServletRequest request){
    	huiyuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(huiyuan);
    	HuiyuanEntity user = huiyuanService.selectOne(new EntityWrapper<HuiyuanEntity>().eq("huiyuankahao", huiyuan.getHuiyuankahao()));
		if(user!=null) {
			return R.error("用户已存在");
		}

		huiyuan.setId(new Date().getTime());
        huiyuanService.insert(huiyuan);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody HuiyuanEntity huiyuan, HttpServletRequest request){
        //ValidatorUtils.validateEntity(huiyuan);
        huiyuanService.updateById(huiyuan);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        huiyuanService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<HuiyuanEntity> wrapper = new EntityWrapper<HuiyuanEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = huiyuanService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}
package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;

import com.entity.YuejiesuantongjiEntity;
import com.entity.view.YuejiesuantongjiView;

import com.service.YuejiesuantongjiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 月结算统计
 * 后端接口
 * @author 
 * @email 
 * @date 2021-05-26 20:54:46
 */
@RestController
@RequestMapping("/yuejiesuantongji")
public class YuejiesuantongjiController {
    @Autowired
    private YuejiesuantongjiService yuejiesuantongjiService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,YuejiesuantongjiEntity yuejiesuantongji, 
                @RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date yuefenstart,
                @RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date yuefenend,
		HttpServletRequest request){

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("jiaolian")) {
			yuejiesuantongji.setJiaolianbianhao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<YuejiesuantongjiEntity> ew = new EntityWrapper<YuejiesuantongjiEntity>();
                if(yuefenstart!=null) ew.ge("yuefen", yuefenstart);
                if(yuefenend!=null) ew.le("yuefen", yuefenend);
		PageUtils page = yuejiesuantongjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yuejiesuantongji), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,YuejiesuantongjiEntity yuejiesuantongji, 
                @RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date yuefenstart,
                @RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date yuefenend,
		HttpServletRequest request){

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("jiaolian")) {
			yuejiesuantongji.setJiaolianbianhao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<YuejiesuantongjiEntity> ew = new EntityWrapper<YuejiesuantongjiEntity>();
                if(yuefenstart!=null) ew.ge("yuefen", yuefenstart);
                if(yuefenend!=null) ew.le("yuefen", yuefenend);
		PageUtils page = yuejiesuantongjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yuejiesuantongji), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( YuejiesuantongjiEntity yuejiesuantongji){
       	EntityWrapper<YuejiesuantongjiEntity> ew = new EntityWrapper<YuejiesuantongjiEntity>();
      	ew.allEq(MPUtil.allEQMapPre( yuejiesuantongji, "yuejiesuantongji")); 
        return R.ok().put("data", yuejiesuantongjiService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(YuejiesuantongjiEntity yuejiesuantongji){
        EntityWrapper< YuejiesuantongjiEntity> ew = new EntityWrapper< YuejiesuantongjiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( yuejiesuantongji, "yuejiesuantongji")); 
		YuejiesuantongjiView yuejiesuantongjiView =  yuejiesuantongjiService.selectView(ew);
		return R.ok("查询月结算统计成功").put("data", yuejiesuantongjiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        YuejiesuantongjiEntity yuejiesuantongji = yuejiesuantongjiService.selectById(id);
        return R.ok().put("data", yuejiesuantongji);
    }

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



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody YuejiesuantongjiEntity yuejiesuantongji, HttpServletRequest request){
    	yuejiesuantongji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(yuejiesuantongji);

        yuejiesuantongjiService.insert(yuejiesuantongji);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody YuejiesuantongjiEntity yuejiesuantongji, HttpServletRequest request){
    	yuejiesuantongji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(yuejiesuantongji);
    	yuejiesuantongji.setUserid((Long)request.getSession().getAttribute("userId"));

        yuejiesuantongjiService.insert(yuejiesuantongji);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody YuejiesuantongjiEntity yuejiesuantongji, HttpServletRequest request){
        //ValidatorUtils.validateEntity(yuejiesuantongji);
        yuejiesuantongjiService.updateById(yuejiesuantongji);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        yuejiesuantongjiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<YuejiesuantongjiEntity> wrapper = new EntityWrapper<YuejiesuantongjiEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("jiaolian")) {
			wrapper.eq("jiaolianbianhao", (String)request.getSession().getAttribute("username"));
		}

		int count = yuejiesuantongjiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值