摘 要
由于APP软件在开发以及运营上面所需成本较高,而用户手机需要安装各种APP软件,因此占用用户过多的手机存储空间,导致用户手机运行缓慢,体验度比较差,进而导致用户会卸载非必要的APP,倒逼管理者必须改变运营策略。随着微信小程序的出现,解决了用户非独立APP不可访问内容的痛点,所以很多APP软件都转向微信小程序。本次课题就运用了微信小程序技术开发一个旅游出行必备商城小程序。
旅游出行必备商城小程序借助微信开发者工具开发用户前端,使用SSM框架和Java语言开发管理员后台,使用Mysql创建数据表保存本系统产生的数据。系统可以提供信息显示和相应服务,其管理员管理旅游出行必备的商品信息,管理景点,管理门票预订订单和商品购买的订单,管理用户资料和新闻资讯。用户购买旅游出行必备的商品,预订景点的门票,在线支付商品订单和门票预订订单,可以评论并收藏商品,新闻和景点。
总之,旅游出行必备商城小程序可以更加方便用户购买旅游出行必备商品以及预订景点门票,也让旅游景点得到更好的宣传和展示。
关键词:旅游出行必备商城小程序;微信开发者工具;SSM框架
基于ssm旅游出行必备商城微信小程序源码和论文008
演示视频:
基于ssm旅游出行必备商城微信小程序源码和论文
Abstract
Due to the high cost of APP software development and operation, and the user's mobile phone needs to install various APP software, it takes up too much mobile phone storage space of the user, causing the user's mobile phone to run slowly, the experience is relatively poor, and the user will uninstall Non-essential APPs force managers to change their operating strategies. With the emergence of WeChat mini-programs, the pain point that users cannot access content from non-independent APPs has been solved, so many APP software have turned to WeChat mini-programs. This project uses WeChat applet technology to develop an essential shopping mall applet for travel.
Traveling essential shopping mall applet uses WeChat developer tools to develop the user front end, uses the SSM framework and the Java language to develop the administrator backend, and uses Mysql to create a data table to save the data generated by the system. The system can provide information display and corresponding services. Its administrator manages the commodity information necessary for travel, manages scenic spots, manages ticket reservation orders and commodity purchase orders, and manages user information and news information. Users purchase essential goods for travel, book tickets for scenic spots, pay for merchandise orders and ticket booking orders online, and can comment on and collect merchandise, news and scenic spots.
In short, the travel must-have shopping mall applet can make it more convenient for users to purchase travel-required goods and book scenic spots tickets, and also allow tourist attractions to be better promoted and displayed.
Key Words:Mini Program for Traveling Essential Mall; WeChat Developer Tool; 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.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.JingdianfenleiEntity;
import com.entity.view.JingdianfenleiView;
import com.service.JingdianfenleiService;
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-03-02 17:34:28
*/
@RestController
@RequestMapping("/jingdianfenlei")
public class JingdianfenleiController {
@Autowired
private JingdianfenleiService jingdianfenleiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,JingdianfenleiEntity jingdianfenlei, HttpServletRequest request){
EntityWrapper<JingdianfenleiEntity> ew = new EntityWrapper<JingdianfenleiEntity>();
PageUtils page = jingdianfenleiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jingdianfenlei), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,JingdianfenleiEntity jingdianfenlei, HttpServletRequest request){
EntityWrapper<JingdianfenleiEntity> ew = new EntityWrapper<JingdianfenleiEntity>();
PageUtils page = jingdianfenleiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jingdianfenlei), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( JingdianfenleiEntity jingdianfenlei){
EntityWrapper<JingdianfenleiEntity> ew = new EntityWrapper<JingdianfenleiEntity>();
ew.allEq(MPUtil.allEQMapPre( jingdianfenlei, "jingdianfenlei"));
return R.ok().put("data", jingdianfenleiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(JingdianfenleiEntity jingdianfenlei){
EntityWrapper< JingdianfenleiEntity> ew = new EntityWrapper< JingdianfenleiEntity>();
ew.allEq(MPUtil.allEQMapPre( jingdianfenlei, "jingdianfenlei"));
JingdianfenleiView jingdianfenleiView = jingdianfenleiService.selectView(ew);
return R.ok("查询景点分类成功").put("data", jingdianfenleiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
JingdianfenleiEntity jingdianfenlei = jingdianfenleiService.selectById(id);
return R.ok().put("data", jingdianfenlei);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
JingdianfenleiEntity jingdianfenlei = jingdianfenleiService.selectById(id);
return R.ok().put("data", jingdianfenlei);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody JingdianfenleiEntity jingdianfenlei, HttpServletRequest request){
jingdianfenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(jingdianfenlei);
jingdianfenleiService.insert(jingdianfenlei);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody JingdianfenleiEntity jingdianfenlei, HttpServletRequest request){
jingdianfenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(jingdianfenlei);
jingdianfenleiService.insert(jingdianfenlei);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody JingdianfenleiEntity jingdianfenlei, HttpServletRequest request){
//ValidatorUtils.validateEntity(jingdianfenlei);
jingdianfenleiService.updateById(jingdianfenlei);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
jingdianfenleiService.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<JingdianfenleiEntity> wrapper = new EntityWrapper<JingdianfenleiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = jingdianfenleiService.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.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.LvyoushangpinEntity;
import com.entity.view.LvyoushangpinView;
import com.service.LvyoushangpinService;
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-03-02 17:34:28
*/
@RestController
@RequestMapping("/lvyoushangpin")
public class LvyoushangpinController {
@Autowired
private LvyoushangpinService lvyoushangpinService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,LvyoushangpinEntity lvyoushangpin, HttpServletRequest request){
EntityWrapper<LvyoushangpinEntity> ew = new EntityWrapper<LvyoushangpinEntity>();
PageUtils page = lvyoushangpinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, lvyoushangpin), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,LvyoushangpinEntity lvyoushangpin, HttpServletRequest request){
EntityWrapper<LvyoushangpinEntity> ew = new EntityWrapper<LvyoushangpinEntity>();
PageUtils page = lvyoushangpinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, lvyoushangpin), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( LvyoushangpinEntity lvyoushangpin){
EntityWrapper<LvyoushangpinEntity> ew = new EntityWrapper<LvyoushangpinEntity>();
ew.allEq(MPUtil.allEQMapPre( lvyoushangpin, "lvyoushangpin"));
return R.ok().put("data", lvyoushangpinService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(LvyoushangpinEntity lvyoushangpin){
EntityWrapper< LvyoushangpinEntity> ew = new EntityWrapper< LvyoushangpinEntity>();
ew.allEq(MPUtil.allEQMapPre( lvyoushangpin, "lvyoushangpin"));
LvyoushangpinView lvyoushangpinView = lvyoushangpinService.selectView(ew);
return R.ok("查询旅游商品成功").put("data", lvyoushangpinView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
LvyoushangpinEntity lvyoushangpin = lvyoushangpinService.selectById(id);
return R.ok().put("data", lvyoushangpin);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
LvyoushangpinEntity lvyoushangpin = lvyoushangpinService.selectById(id);
return R.ok().put("data", lvyoushangpin);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody LvyoushangpinEntity lvyoushangpin, HttpServletRequest request){
lvyoushangpin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(lvyoushangpin);
lvyoushangpinService.insert(lvyoushangpin);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody LvyoushangpinEntity lvyoushangpin, HttpServletRequest request){
lvyoushangpin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(lvyoushangpin);
lvyoushangpinService.insert(lvyoushangpin);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody LvyoushangpinEntity lvyoushangpin, HttpServletRequest request){
//ValidatorUtils.validateEntity(lvyoushangpin);
lvyoushangpinService.updateById(lvyoushangpin);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
lvyoushangpinService.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<LvyoushangpinEntity> wrapper = new EntityWrapper<LvyoushangpinEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = lvyoushangpinService.selectCount(wrapper);
return R.ok().put("count", count);
}
}