基于java+ssm+vue的松江大学城就餐推荐系统微信小程序

🙊作者简介:多年编程开发经验,专注java技术领域和毕业设计项目实战,系统定制、远程部署调试、代码讲解、代码修改
🍅擅长语言:springboot、ssm、vue、html、jsp、php、python、爬虫、小程序、安卓app
⬇️源码获取:文末可以获取源码+数据库+文档

 

⚡感兴趣的可以先收藏+关注,后续会更新更多项目资料,所有项目均配有开发文档和安装配置教程

1cd00dd43cb84cc9a368bb6b9a1afa39.png

系统介绍

 知识改变命运,科技的发展造就小程序在美食推荐的管理工作中也占有重要份额。美食推荐的管理工作也向着信息化管理进军。由于内部每个工作部门之间的责任问题使美食推荐的工作信息分散,不好统计,实现不了信息共享等问题,迫切的需要科技和小程序技术的加入。

 本松江大学城就餐推荐系统从美食推荐管理出发,经过了分析与设计,所设计的功能可以符合餐饮推荐的真实需求,并且在操作上也可以适当大众。本系统在数据库上采用MySQL数据库,保证系统中数据的完整性。本系统的重点是信息的调用与安全问题,经过研究和调查,本松江大学城就餐推荐系统在开发语言上使用了Java语言,微信小程序技术、SSM框架以及Vue技术,所设计的角色包括管理员和用户。用户可以浏览餐厅信息、美食信息进行评价、收藏,管理员可以管理用户的信息和美食、餐厅、评价的信息。所设计的系统保证了美食推荐相关工作信息的安全和用户的权利。

系统主要技术

开发语言:Java

使用框架:SpringBoot

系统架构:B/S

前端技术:Vue、JavaScript

数据库 :Mysql 5.7/8.0

编译工具:idea或者eclipse,jdk1.8,maven

系统功能结构设计

本系统是在Java语言和MySQL数据库的基础上进行设计的,在管理端采用了B/S结构进行设计,也就是可以利用浏览器进行用户的反馈和交互,本系统可以在单机上运行,不用网络。所以在设计好系统后可以直接进行服务器的配置,本系统使用的服务器为Tomcat,这种服务器在Idea软件中,不用安装。这样进行松江大学城就餐推荐系统的设计就可以解决固定时间和固定地点的问题,所设计的系统包括了两个方面,管理员和用户。管理员功能是对前台信息的维护,可以发布餐厅信息,资讯信息和美食信息等。用户可以在前台浏览餐厅、美食信息进行评论、收藏等。本系统的系统功能结构图如下图4.2所示:

 

578c35f88a0a4b44920e7f0d6564052a.png

图4.2系统功能模块结构图

 

系统功能实现

5.1前台界面设计

本界面可以看到程序的名称,信息搜索的窗口和每个具体的功能,本界面是松江大学城就餐推荐系统的门户,并在前台界面加入了轮播图的展示,使界面看起来更好看。设计界面如5.1所示:

d68ae84729c74856bbbbf48ce70cae9a.png

图5.1松江大学城就餐推荐系统前台界面设计

5.2校园资讯功能设计

本功能模块可以展示最新的校园资讯信息,所有的资讯信息以发布的时间进行先后排列,在此界面展示的信息有三种,一种是序号,一种是资讯的标题,还有一种是资讯发布的时间,界面设计如下图5.2所示:

3bf3842dc08a49edb7e6a1b8ec61cb05.png

图5.2校园资讯信息设计界面

5.3餐厅信息功能设计

本界面展示了所有的餐厅推荐信息,可以进行详情了解。设计界面如下图5.3所示:

f980af2024c24f42b656844dd2041626.png

图5.3餐厅推荐信息设计界面

5.4美食信息设计界面

本界面的美食信息是管理员进行发布的,当想要收藏、评论的时候可以点击美食信息里的功能按钮,进入相关界面进行操作,设计界面如下图5.4所示:

d0cc5153ecd34ce1979196d246bb99a6.png

图5.4松江大学城就餐推荐系统美食详情实现界面

5.5 用户注册功能的设计实现

本界面是用来用户注册使用的,管理员的账号和密码不能通过注册来获得,管理员可以在数据库中进行设置,用户注册的实现界面如下图5.5所示:

6aa375b3294741489ce913c072d5305a.png

图5.5用户注册实现界面

5.6在线评价功能实现

用户在登录后可以实现美食、餐厅的评价,在线评价的内容必须填写才可以评价成功,实现界面如下图5.6所示:

b668be2e1d9448b3af126197d7aa5320.png

图5.6用户在线评价实现界面

5.7管理员登录功能设计

本界面采用图片为背景进行设计,供管理员去管理信息所使用,管理员的账号和密码需要去数据库里进行设置添置,不能在系统网站里设置,登录实现界面如下图5.7所示:

1db4f7e4e5f44816a3bf415aada770a6.png

图5.7管理员登录功能实现界面

5.8管理员功能界面的实现

本界面的功能包括个人中心管理,校园资讯的添加和管理,美食信息的添加和管理,用户信息的审核和管理,餐厅信息的添加和管理以及校园资讯、评论、美食类型、餐厅美食等信息的管理。实际的界面实现如下图5.8所示: 

e516a806e6f348fbacbc343e5ef82598.png

图5.8管理员功能界面实现

5.9我的的功能界面设计

本界面包括的功能有个人资料管理,评价管理和收藏管理。功能界面设计如图5.9所示:

9d8734cfac76480db40576777ed1e3c2.png

图5.9我的功能界面的实现

 

 

论文参考

0f9c7da11a4246c680832fb0e0da7e20.png

0889b06768b644cabd98fcc4831b8fe2.png

dd3d77d0b73a4bf28b398ab7f3fd5b30.png

核心代码

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 java.io.IOException;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
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.CantingmeishiEntity;
import com.entity.view.CantingmeishiView;

import com.service.CantingmeishiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import com.service.StoreupService;
import com.entity.StoreupEntity;

/**
 * 餐厅美食
 * 后端接口
 * @author 
 * @email 
 * @date 
 */
@RestController
@RequestMapping("/cantingmeishi")
public class CantingmeishiController {
    @Autowired
    private CantingmeishiService cantingmeishiService;


    @Autowired
    private StoreupService storeupService;

    


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

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

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(CantingmeishiEntity cantingmeishi){
        EntityWrapper< CantingmeishiEntity> ew = new EntityWrapper< CantingmeishiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( cantingmeishi, "cantingmeishi")); 
		CantingmeishiView cantingmeishiView =  cantingmeishiService.selectView(ew);
		return R.ok("查询餐厅美食成功").put("data", cantingmeishiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        CantingmeishiEntity cantingmeishi = cantingmeishiService.selectById(id);
		cantingmeishi.setClicknum(cantingmeishi.getClicknum()+1);
		cantingmeishi.setClicktime(new Date());
		cantingmeishiService.updateById(cantingmeishi);
        return R.ok().put("data", cantingmeishi);
    }

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


    /**
     * 赞或踩
     */
    @RequestMapping("/thumbsup/{id}")
    public R thumbsup(@PathVariable("id") String id,String type){
        CantingmeishiEntity cantingmeishi = cantingmeishiService.selectById(id);
        if(type.equals("1")) {
        	cantingmeishi.setThumbsupnum(cantingmeishi.getThumbsupnum()+1);
        } else {
        	cantingmeishi.setCrazilynum(cantingmeishi.getCrazilynum()+1);
        }
        cantingmeishiService.updateById(cantingmeishi);
        return R.ok();
    }

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

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

        cantingmeishiService.insert(cantingmeishi);
        return R.ok();
    }

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

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


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







}

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值