基于ssm后端的停车场微信小程序的设计与实现

这篇具有很好参考价值的文章主要介绍了基于ssm后端的停车场微信小程序的设计与实现。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

停车场微信小程序的设计与实现

摘要

随着信息技术在管理上越来越深入而广泛的应用,管理信息系统的实施在技术上已逐步成熟。本文介绍了停车场微信小程序的开发全过程。通过分析停车场微信小程序管理的不足,创建了一个计算机管理停车场微信小程序的方案。文章介绍了停车场微信小程序的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。

本停车场微信小程序有管理员,用户,以及商家三个角色。管理员功能有个人中心,车主管理,商家管理,停车场信息管理,预约停车管理,取消预约管理,进场停车管理,商场收费管理,留言板管理,系统管理等。商家可以提交停车信息,用户可以停车。因而具有一定的实用性。

本站后台采用Java的SSM框架进行后台管理开发,可以在浏览器上登录进行后台数据方面的管理,MySQL作为本地数据库,微信小程序用到了微信开发者工具,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得停车场微信小程序管理工作系统化、规范化。

关键词:停车场微信小程序;SSM框架;MYSQL数据库

基于ssm后端的停车场微信小程序的设计与实现weixin077

演示视频:

基于ssm后端的停车场管理微信小程序源码和论文

Abstract

With the deepening and extensive application of information technology in management, the implementation of management information systems has gradually matured in technology. This article introduces the whole process of the development of WeChat mini program for parking lot. By analyzing the shortcomings of the parking lot WeChat applet management, a computer management scheme for the parking lot WeChat applet was created. The article introduces the system analysis part of the parking lot WeChat applet, including feasibility analysis, etc. The system design part mainly introduces the system function design and database design.

The WeChat Mini Program of this parking lot has three roles: administrator, user, and merchant. Administrator functions include personal center, car owner management, business management, parking lot information management, reserved parking management, reservation cancellation management, entrance parking management, shopping mall charging management, message board management, system management, etc. Merchants can submit parking information, and users can park. So it has a certain practicability.

The background of this site uses the Java SSM framework for background management and development. You can log in on the browser for background data management. MySQL is used as a local database. WeChat applets use WeChat developer tools to fully ensure system stability. The system has the characteristics of clear interface, simple operation and complete functions, which makes the management of the parking lot WeChat applet system and standardized.

Keywords:Parking lot WeChat applet; SSM framework; MYSQL database

基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java基于ssm后端的停车场微信小程序的设计与实现,微信小程序,小程序,java

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.TingchechangxinxiEntity;
import com.entity.view.TingchechangxinxiView;

import com.service.TingchechangxinxiService;
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-01 09:39:12
 */
@RestController
@RequestMapping("/tingchechangxinxi")
public class TingchechangxinxiController {
    @Autowired
    private TingchechangxinxiService tingchechangxinxiService;
    


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

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

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("shangjia")) {
			tingchechangxinxi.setShangjiazhanghao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<TingchechangxinxiEntity> ew = new EntityWrapper<TingchechangxinxiEntity>();
		PageUtils page = tingchechangxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tingchechangxinxi), params), params));
        return R.ok().put("data", page);
    }

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(TingchechangxinxiEntity tingchechangxinxi){
        EntityWrapper< TingchechangxinxiEntity> ew = new EntityWrapper< TingchechangxinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( tingchechangxinxi, "tingchechangxinxi")); 
		TingchechangxinxiView tingchechangxinxiView =  tingchechangxinxiService.selectView(ew);
		return R.ok("查询停车场信息成功").put("data", tingchechangxinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        TingchechangxinxiEntity tingchechangxinxi = tingchechangxinxiService.selectById(id);
		tingchechangxinxi.setClicknum(tingchechangxinxi.getClicknum()+1);
		tingchechangxinxi.setClicktime(new Date());
		tingchechangxinxiService.updateById(tingchechangxinxi);
        return R.ok().put("data", tingchechangxinxi);
    }

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



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

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

        tingchechangxinxiService.insert(tingchechangxinxi);
        return R.ok();
    }

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

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

		int count = tingchechangxinxiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
	/**
     * 前端智能排序
     */
	@IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,TingchechangxinxiEntity tingchechangxinxi, HttpServletRequest request,String pre){
        EntityWrapper<TingchechangxinxiEntity> ew = new EntityWrapper<TingchechangxinxiEntity>();
        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 = tingchechangxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tingchechangxinxi), params), params));
        return R.ok().put("data", page);
    }


}

 文章来源地址https://www.toymoban.com/news/detail-765174.html

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.ChezhuEntity;
import com.entity.view.ChezhuView;

import com.service.ChezhuService;
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-01 09:39:12
 */
@RestController
@RequestMapping("/chezhu")
public class ChezhuController {
    @Autowired
    private ChezhuService chezhuService;
    
	@Autowired
	private TokenService tokenService;
	
	/**
	 * 登录
	 */
	@IgnoreAuth
	@RequestMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		ChezhuEntity user = chezhuService.selectOne(new EntityWrapper<ChezhuEntity>().eq("zhanghao", username));
		if(user==null || !user.getMima().equals(password)) {
			return R.error("账号或密码不正确");
		}
		String token = tokenService.generateToken(user.getId(), username,"chezhu",  "车主" );
		return R.ok().put("token", token);
	}
	
	/**
     * 注册
     */
	@IgnoreAuth
    @RequestMapping("/register")
    public R register(@RequestBody ChezhuEntity chezhu){
    	//ValidatorUtils.validateEntity(chezhu);
    	ChezhuEntity user = chezhuService.selectOne(new EntityWrapper<ChezhuEntity>().eq("zhanghao", chezhu.getZhanghao()));
		if(user!=null) {
			return R.error("注册用户已存在");
		}
		Long uId = new Date().getTime();
		chezhu.setId(uId);
        chezhuService.insert(chezhu);
        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");
        ChezhuEntity user = chezhuService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	ChezhuEntity user = chezhuService.selectOne(new EntityWrapper<ChezhuEntity>().eq("zhanghao", username));
    	if(user==null) {
    		return R.error("账号不存在");
    	}
    	user.setMima("123456");
        chezhuService.updateById(user);
        return R.ok("密码已重置为:123456");
    }


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

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

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(ChezhuEntity chezhu){
        EntityWrapper< ChezhuEntity> ew = new EntityWrapper< ChezhuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( chezhu, "chezhu")); 
		ChezhuView chezhuView =  chezhuService.selectView(ew);
		return R.ok("查询车主成功").put("data", chezhuView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ChezhuEntity chezhu = chezhuService.selectById(id);
        return R.ok().put("data", chezhu);
    }

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



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

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

		chezhu.setId(new Date().getTime());
        chezhuService.insert(chezhu);
        return R.ok();
    }

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

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


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


}

到了这里,关于基于ssm后端的停车场微信小程序的设计与实现的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包