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

计算机技术的飞速发展带动了各种管理软件的兴起,对我们的工作管理、生活都是很大的帮助,本健身房私教预约微信小程序是采用小程序技术开发的对课程购买、预约工作的信息化、数字化管理,以改变传统的纸质预约方式,本健身房私教预约微信小程序从管理员,用户,教练三个角色来进行功能设计,本论文详细的介绍了健身房私教预约微信小程序的设计过程,并对课题的需求和背景意义目的进行分析介绍,从面向对象的方面进行开发设计,对设计课题的可行性进行详细分析,最后完成本健身房私教预约微信小程序的实现。

本健身房私教预约微信小程序是运行在Eclipse软件上,采用的框架为SSM。主要的功能包括管理员可以对课程管理,对预约管理,对课程购买管理,对课程评价管理和对用户管理,对留言信息管理,用户可以实现个人资料管理,对课程购买、对课程预约;教练可以审核用户的预约以及上传新的课程等。

基于ssm后端的健身房私教预约微信小程序源码和论文weixin112

关键词课程购买;课程预约;Java语言;SSM框架

演示视频:

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

Abstract

The rapid development of computer technology has led to the rise of various management software, which is of great help to our work management and life. The private teaching appointment WeChat applet in this gymnasium is developed using applet technology to realize the informatization and digital management of course purchase and appointment work, so as to change the traditional paper appointment method. The private teaching appointment WeChat applet in this gymnasium is from administrator to user, The coach has three roles to design the function. This paper introduces the design process of the gym private education appointment WeChat applet in detail, analyzes and introduces the needs and background significance of the project, develops and designs the project from the object-oriented perspective, analyzes the feasibility of the design project in detail, and finally completes the implementation of the gym private education appointment WeChat applet.

This gym private education appointment WeChat applet is running on Eclipse software, and the framework is SSM. The main functions include course management, reservation management, course purchase management, course evaluation management and user management, message information management, and user information management. Users can realize personal data management, course purchase and course reservation; The coach can review the user's appointment and upload new courses.

Key words: course purchase; Course reservation; Java language; SSM Framework

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.SijiaokechengEntity;
import com.entity.view.SijiaokechengView;

import com.service.SijiaokechengService;
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-04-02 09:44:11
 */
@RestController
@RequestMapping("/sijiaokecheng")
public class SijiaokechengController {
    @Autowired
    private SijiaokechengService sijiaokechengService;
    


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

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("jiaolian")) {
			sijiaokecheng.setJiaoliangonghao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<SijiaokechengEntity> ew = new EntityWrapper<SijiaokechengEntity>();
		PageUtils page = sijiaokechengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, sijiaokecheng), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,SijiaokechengEntity sijiaokecheng, HttpServletRequest request){
        EntityWrapper<SijiaokechengEntity> ew = new EntityWrapper<SijiaokechengEntity>();
		PageUtils page = sijiaokechengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, sijiaokecheng), params), params));
        return R.ok().put("data", page);
    }

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(SijiaokechengEntity sijiaokecheng){
        EntityWrapper< SijiaokechengEntity> ew = new EntityWrapper< SijiaokechengEntity>();
 		ew.allEq(MPUtil.allEQMapPre( sijiaokecheng, "sijiaokecheng")); 
		SijiaokechengView sijiaokechengView =  sijiaokechengService.selectView(ew);
		return R.ok("查询私教课程成功").put("data", sijiaokechengView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        SijiaokechengEntity sijiaokecheng = sijiaokechengService.selectById(id);
		sijiaokecheng.setClicknum(sijiaokecheng.getClicknum()+1);
		sijiaokecheng.setClicktime(new Date());
		sijiaokechengService.updateById(sijiaokecheng);
        return R.ok().put("data", sijiaokecheng);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        SijiaokechengEntity sijiaokecheng = sijiaokechengService.selectById(id);
		sijiaokecheng.setClicknum(sijiaokecheng.getClicknum()+1);
		sijiaokecheng.setClicktime(new Date());
		sijiaokechengService.updateById(sijiaokecheng);
        return R.ok().put("data", sijiaokecheng);
    }
    



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

        sijiaokechengService.insert(sijiaokecheng);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody SijiaokechengEntity sijiaokecheng, HttpServletRequest request){
    	sijiaokecheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(sijiaokecheng);

        sijiaokechengService.insert(sijiaokecheng);
        return R.ok();
    }

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

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        sijiaokechengService.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<SijiaokechengEntity> wrapper = new EntityWrapper<SijiaokechengEntity>();
		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("jiaoliangonghao", (String)request.getSession().getAttribute("username"));
		}

		int count = sijiaokechengService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
	/**
     * 前端智能排序
     */
	@IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,SijiaokechengEntity sijiaokecheng, HttpServletRequest request,String pre){
        EntityWrapper<SijiaokechengEntity> ew = new EntityWrapper<SijiaokechengEntity>();
        Map<String, Object> newMap = new HashMap<String, Object>();
        Map<String, Object> param = new HashMap<String, Object>();
		Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry<String, Object> entry = it.next();
			String key = entry.getKey();
			String newKey = entry.getKey();
			if (pre.endsWith(".")) {
				newMap.put(pre + newKey, entry.getValue());
			} else if (StringUtils.isEmpty(pre)) {
				newMap.put(newKey, entry.getValue());
			} else {
				newMap.put(pre + "." + newKey, entry.getValue());
			}
		}
		params.put("sort", "clicknum");
        
        params.put("order", "desc");
		PageUtils page = sijiaokechengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, sijiaokecheng), params), params));
        return R.ok().put("data", page);
    }


}

 

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.KechengleixingEntity;
import com.entity.view.KechengleixingView;

import com.service.KechengleixingService;
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-04-02 09:44:11
 */
@RestController
@RequestMapping("/kechengleixing")
public class KechengleixingController {
    @Autowired
    private KechengleixingService kechengleixingService;
    


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

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

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(KechengleixingEntity kechengleixing){
        EntityWrapper< KechengleixingEntity> ew = new EntityWrapper< KechengleixingEntity>();
 		ew.allEq(MPUtil.allEQMapPre( kechengleixing, "kechengleixing")); 
		KechengleixingView kechengleixingView =  kechengleixingService.selectView(ew);
		return R.ok("查询课程类型成功").put("data", kechengleixingView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        KechengleixingEntity kechengleixing = kechengleixingService.selectById(id);
        return R.ok().put("data", kechengleixing);
    }

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



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

        kechengleixingService.insert(kechengleixing);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody KechengleixingEntity kechengleixing, HttpServletRequest request){
    	kechengleixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(kechengleixing);

        kechengleixingService.insert(kechengleixing);
        return R.ok();
    }

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

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        kechengleixingService.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<KechengleixingEntity> wrapper = new EntityWrapper<KechengleixingEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


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


}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值