ssm+vue校园美食交流系统源码和论文026
开发工具:idea
数据库mysql5.7+
数据库链接工具:navcat,小海豚等
技术:ssm
摘 要
随着现在网络的快速发展,网上管理系统也逐渐快速发展起来,网上管理模式很快融入到了许多商家的之中,随之就产生了“校园美食交流系统”,这样就让校园美食交流系统更加方便简单。
对于本校园美食交流系统的设计来说,系统开发主要是采用java语言技术,在整个系统的设计中应用MySQL数据库来完成数据存储,具体根据校园美食交流系统的现状来进行开发的,具体根据现实的需求来实现校园美食交流系统网络化的管理,各类信息有序地进行存储,进入校园美食交流系统页面之后,方可开始操作主控界面,主要功能包括管理员:首页、个人中心、美食分类管理、美食信息管理、用户管理、管理员管理、论坛中心、系统管理。前台首页:首页、美食信息、论坛中心、美食资讯、个人中心、后台管理、网站建议。用户:首页、个人中心、我的收藏管理功能。
本论文主要讲述了校园美食交流系统开发背景,该系统它主要是对需求分析和功能需求做了介绍,并且对系统做了详细的测试和总结。具体从业务流程、数据库设计和系统结构等多方面的问题。望能利用先进的计算机技术和网络技术来改变目前的校园美食交流系统状况,提高管理效率。
关键词:校园美食交流系统;SSM框架,mysql数据库,B/S模式
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.MeishixinxiEntity;
import com.entity.view.MeishixinxiView;import com.service.MeishixinxiService;
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 2023-02-21 10:49:29*/
@RestController
@RequestMapping("/meishixinxi")
public class MeishixinxiController {@Autowiredprivate MeishixinxiService meishixinxiService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,MeishixinxiEntity meishixinxi, HttpServletRequest request){EntityWrapper<MeishixinxiEntity> ew = new EntityWrapper<MeishixinxiEntity>();PageUtils page = meishixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, meishixinxi), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,MeishixinxiEntity meishixinxi, HttpServletRequest request){EntityWrapper<MeishixinxiEntity> ew = new EntityWrapper<MeishixinxiEntity>();PageUtils page = meishixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, meishixinxi), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( MeishixinxiEntity meishixinxi){EntityWrapper<MeishixinxiEntity> ew = new EntityWrapper<MeishixinxiEntity>();ew.allEq(MPUtil.allEQMapPre( meishixinxi, "meishixinxi")); return R.ok().put("data", meishixinxiService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(MeishixinxiEntity meishixinxi){EntityWrapper< MeishixinxiEntity> ew = new EntityWrapper< MeishixinxiEntity>();ew.allEq(MPUtil.allEQMapPre( meishixinxi, "meishixinxi")); MeishixinxiView meishixinxiView = meishixinxiService.selectView(ew);return R.ok("查询美食信息成功").put("data", meishixinxiView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){MeishixinxiEntity meishixinxi = meishixinxiService.selectById(id);meishixinxi.setClicknum(meishixinxi.getClicknum()+1);meishixinxi.setClicktime(new Date());meishixinxiService.updateById(meishixinxi);return R.ok().put("data", meishixinxi);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){MeishixinxiEntity meishixinxi = meishixinxiService.selectById(id);meishixinxi.setClicknum(meishixinxi.getClicknum()+1);meishixinxi.setClicktime(new Date());meishixinxiService.updateById(meishixinxi);return R.ok().put("data", meishixinxi);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody MeishixinxiEntity meishixinxi, HttpServletRequest request){meishixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(meishixinxi);meishixinxiService.insert(meishixinxi);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody MeishixinxiEntity meishixinxi, HttpServletRequest request){meishixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(meishixinxi);meishixinxiService.insert(meishixinxi);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody MeishixinxiEntity meishixinxi, HttpServletRequest request){//ValidatorUtils.validateEntity(meishixinxi);meishixinxiService.updateById(meishixinxi);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){meishixinxiService.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<MeishixinxiEntity> wrapper = new EntityWrapper<MeishixinxiEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = meishixinxiService.selectCount(wrapper);return R.ok().put("count", count);}/*** 前端智能排序*/@IgnoreAuth@RequestMapping("/autoSort")public R autoSort(@RequestParam Map<String, Object> params,MeishixinxiEntity meishixinxi, HttpServletRequest request,String pre){EntityWrapper<MeishixinxiEntity> ew = new EntityWrapper<MeishixinxiEntity>();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 = meishixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, meishixinxi), 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.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.DiscussmeishixinxiEntity;
import com.entity.view.DiscussmeishixinxiView;import com.service.DiscussmeishixinxiService;
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-02-21 10:49:29*/
@RestController
@RequestMapping("/discussmeishixinxi")
public class DiscussmeishixinxiController {@Autowiredprivate DiscussmeishixinxiService discussmeishixinxiService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,DiscussmeishixinxiEntity discussmeishixinxi, HttpServletRequest request){EntityWrapper<DiscussmeishixinxiEntity> ew = new EntityWrapper<DiscussmeishixinxiEntity>();PageUtils page = discussmeishixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussmeishixinxi), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,DiscussmeishixinxiEntity discussmeishixinxi, HttpServletRequest request){EntityWrapper<DiscussmeishixinxiEntity> ew = new EntityWrapper<DiscussmeishixinxiEntity>();PageUtils page = discussmeishixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussmeishixinxi), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( DiscussmeishixinxiEntity discussmeishixinxi){EntityWrapper<DiscussmeishixinxiEntity> ew = new EntityWrapper<DiscussmeishixinxiEntity>();ew.allEq(MPUtil.allEQMapPre( discussmeishixinxi, "discussmeishixinxi")); return R.ok().put("data", discussmeishixinxiService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(DiscussmeishixinxiEntity discussmeishixinxi){EntityWrapper< DiscussmeishixinxiEntity> ew = new EntityWrapper< DiscussmeishixinxiEntity>();ew.allEq(MPUtil.allEQMapPre( discussmeishixinxi, "discussmeishixinxi")); DiscussmeishixinxiView discussmeishixinxiView = discussmeishixinxiService.selectView(ew);return R.ok("查询美食信息评论表成功").put("data", discussmeishixinxiView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){DiscussmeishixinxiEntity discussmeishixinxi = discussmeishixinxiService.selectById(id);return R.ok().put("data", discussmeishixinxi);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){DiscussmeishixinxiEntity discussmeishixinxi = discussmeishixinxiService.selectById(id);return R.ok().put("data", discussmeishixinxi);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody DiscussmeishixinxiEntity discussmeishixinxi, HttpServletRequest request){discussmeishixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(discussmeishixinxi);discussmeishixinxiService.insert(discussmeishixinxi);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody DiscussmeishixinxiEntity discussmeishixinxi, HttpServletRequest request){discussmeishixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(discussmeishixinxi);discussmeishixinxiService.insert(discussmeishixinxi);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody DiscussmeishixinxiEntity discussmeishixinxi, HttpServletRequest request){//ValidatorUtils.validateEntity(discussmeishixinxi);discussmeishixinxiService.updateById(discussmeishixinxi);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){discussmeishixinxiService.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<DiscussmeishixinxiEntity> wrapper = new EntityWrapper<DiscussmeishixinxiEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = discussmeishixinxiService.selectCount(wrapper);return R.ok().put("count", count);}}
前 言
校园美食交流系统是对美食交流发展的一种支持手段,传统的校园美食交流系统模式还处于线下管理阶段,管理效率极低。随着校园美食交流系统信息的不断增多,传统基于线下管理模式已经无法满足当前用户需求,随着信息化时代的到来。通过该系统的设计,管理员可以管理系统中信息同时为了能够有效的提高现在网络信息的处理和准确性,需要不断去发展和更新的校园美食交流系统信息,这样才能有效的提高校园美食交流系统的效率。
互联网作为社会发展当中的产物,带给大家无数的便利和高效。自从有了网络管理方式,互联网的发展就发生了很大的变化,从此互联网在我国各大商家当中也被广泛的应用。针对上述问题我们做了详细的介绍和分析,对于整个系统的管理和发展改变了传统校园美食交流系统模式。