赞
踩
现代经济快节奏发展以及不断完善升级的信息化技术,让传统数据信息的管理升级为软件存储,归纳,集中处理数据信息的管理方式。本个性化美食推荐系统就是在这样的大环境下诞生,其可以帮助管理者在短时间内处理完毕庞大的数据信息,使用这种软件工具可以帮助管理人员提高事务处理效率,达到事半功倍的效果。此个性化美食推荐系统利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发.个性化美食推荐系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。
编程语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SSM
编译工具:idea或者eclipse,jdk1.8,maven
支持定做:java/php/python/android/小程序ue/爬虫/c#/asp.net
5.1用户信息管理
如图5.1显示的就是用户信息管理页面,此页面提供给管理员的功能有:用户信息的查询管理,可以删除用户信息、修改用户信息、新增用户信息,
还进行了对用户名称的模糊查询的条件
图5.1 用户信息管理页面
5.2 美食信息管理
如图5.2显示的就是美食信息管理页面,此页面提供给管理员的功能有:查看已发布的美食信息数据,修改美食信息,美食信息作废,即可删除。
图5.2 美食信息管理页面
5.3美食留言管理
如图5.3显示的就是美食留言管理页面,此页面提供给管理员的功能有:根据美食留言进行条件查询,还可以对美食留言进行新增、修改、查询操作等等。
图5.3 美食留言管理页面
5.1博主推荐管理
如图5.4显示的就是博主推荐管理页面,此页面提供给管理员的功能有:根据博主推荐进行新增、修改、查询操作等等。
图5.4 博主推荐管理页面
package com.controller; import java.text.SimpleDateFormat; import com.alibaba.fastjson.JSONObject; import java.util.*; import com.entity.YonghuEntity; import com.service.YonghuService; import org.springframework.beans.BeanUtils; import javax.servlet.http.HttpServletRequest; import org.springframework.web.context.ContextLoader; import javax.servlet.ServletContext; import com.service.TokenService; import com.utils.StringUtil; import java.lang.reflect.InvocationTargetException; import com.service.DictionaryService; import org.apache.commons.lang3.StringUtils; import com.annotation.IgnoreAuth; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.Wrapper; import com.entity.MeishiEntity; import com.service.MeishiService; import com.entity.view.MeishiView; import com.utils.PageUtils; import com.utils.R; /** * 美食信息 * 后端接口 * @author * @email * @date */ @RestController @Controller @RequestMapping("/meishi") public class MeishiController { private static final Logger logger = LoggerFactory.getLogger(MeishiController.class); @Autowired private MeishiService meishiService; @Autowired private YonghuService yonghuService; @Autowired private TokenService tokenService; @Autowired private DictionaryService dictionaryService; //级联表service /** * 后端列表 */ @RequestMapping("/page") public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); String role = String.valueOf(request.getSession().getAttribute("role")); if(StringUtil.isNotEmpty(role) && "用户".equals(role)){ params.put("yonghuId",request.getSession().getAttribute("userId")); } params.put("orderBy","id"); PageUtils page = meishiService.queryPage(params); //字典表数据转换 List<MeishiView> list =(List<MeishiView>)page.getList(); for(MeishiView c:list){ //修改对应字典表字段 dictionaryService.dictionaryConvert(c); } return R.ok().put("data", page); } /** * 后端详情 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); MeishiEntity meishi = meishiService.selectById(id); if(meishi !=null){ //entity转view MeishiView view = new MeishiView(); BeanUtils.copyProperties( meishi , view );//把实体数据重构到view中 //修改对应字典表字段 dictionaryService.dictionaryConvert(view); return R.ok().put("data", view); }else { return R.error(511,"查不到数据"); } } /** * 后端保存 */ @RequestMapping("ve") public R save(@RequestBody MeishiEntity meishi, HttpServletRequest request){ logger.debug("save方法:,,Controller:{},,meishi:{}",this.getClass().getName(),meishi.toString()); Wrapper<MeishiEntity> queryWrapper = new EntityWrapper<MeishiEntity>() .eq("meishi_name", meishi.getMeishiName()) .eq("kouwei_types", meishi.getKouweiTypes()) .eq("dianzhi_types", meishi.getDianzhiTypes()) .eq("meishi_jieyue", meishi.getMeishiJieyue()) ; logger.info("sql语句:"+queryWrapper.getSqlSegment()); MeishiEntity meishiEntity = meishiService.selectOne(queryWrapper); if(meishiEntity==null){ meishi.setCreateTime(new Date()); // String role = String.valueOf(request.getSession().getAttribute("role")); // if("".equals(role)){ // meishi.set // } meishiService.insert(meishi); return R.ok(); }else { return R.error(511,"表中有相同数据"); } } /** * 后端修改 */ @RequestMapping("/update") public R update(@RequestBody MeishiEntity meishi, HttpServletRequest request){ logger.debug("update方法:,,Controller:{},,meishi:{}",this.getClass().getName(),meishi.toString()); //根据字段查询是否有相同数据 Wrapper<MeishiEntity> queryWrapper = new EntityWrapper<MeishiEntity>() .notIn("id",meishi.getId()) .andNew() .eq("meishi_name", meishi.getMeishiName()) .eq("kouwei_types", meishi.getKouweiTypes()) .eq("dianzhi_types", meishi.getDianzhiTypes()) .eq("meishi_jieyue", meishi.getMeishiJieyue()) ; logger.info("sql语句:"+queryWrapper.getSqlSegment()); MeishiEntity meishiEntity = meishiService.selectOne(queryWrapper); if("".equals(meishi.getMeishiPhoto()) || "null".equals(meishi.getMeishiPhoto())){ meishi.setMeishiPhoto(null); } if(meishiEntity==null){ // String role = String.valueOf(request.getSession().getAttribute("role")); // if("".equals(role)){ // meishi.set // } meishiService.updateById(meishi);//根据id更新 return R.ok(); }else { return R.error(511,"表中有相同数据"); } } /** * 删除 */ @RequestMapping("/delete") public R delete(@RequestBody Integer[] ids){ logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); meishiService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); } /** * 前端列表 */ @RequestMapping("st") public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){ logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); String role = String.valueOf(request.getSession().getAttribute("role")); YonghuEntity userId = yonghuService.selectById((Integer) request.getSession().getAttribute("userId")); if(StringUtil.isNotEmpty(role) && "用户".equals(role)){ params.put("yonghuId",request.getSession().getAttribute("userId")); } if(StringUtil.isNotEmpty(String.valueOf(params.get("flag"))) && params.get("flag").equals("1")){ params.put("kouweiTypes",userId.getKouweiTypes()); } if(StringUtil.isNotEmpty(String.valueOf(params.get("flag"))) && params.get("flag").equals("2")){ params.put("orderBy","meishi_jieyue"); } if(StringUtil.isNotEmpty(String.valueOf(params.get("flag"))) && params.get("flag").equals("3")){ params.put("dianzhiTypes",userId.getDianzhiTypes()); } // 没有指定排序字段就默认id倒序 if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){ params.put("orderBy","id"); } PageUtils page = meishiService.queryPage(params); //字典表数据转换 List<MeishiView> list =(List<MeishiView>)page.getList(); for(MeishiView c:list){ //修改对应字典表字段 dictionaryService.dictionaryConvert(c); } return R.ok().put("data", page); } /** * 前端详情 */ @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); MeishiEntity meishi = meishiService.selectById(id); if(meishi !=null){ //entity转view MeishiView view = new MeishiView(); BeanUtils.copyProperties( meishi , view );//把实体数据重构到view中 //修改对应字典表字段 dictionaryService.dictionaryConvert(view); return R.ok().put("data", view); }else { return R.error(511,"查不到数据"); } } /** * 前端保存 */ @RequestMapping("/add") public R add(@RequestBody MeishiEntity meishi, HttpServletRequest request){ logger.debug("add方法:,,Controller:{},,meishi:{}",this.getClass().getName(),meishi.toString()); Wrapper<MeishiEntity> queryWrapper = new EntityWrapper<MeishiEntity>() .eq("meishi_name", meishi.getMeishiName()) .eq("kouwei_types", meishi.getKouweiTypes()) .eq("dianzhi_types", meishi.getDianzhiTypes()) .eq("meishi_jieyue", meishi.getMeishiJieyue()) ; logger.info("sql语句:"+queryWrapper.getSqlSegment()); MeishiEntity meishiEntity = meishiService.selectOne(queryWrapper); if(meishiEntity==null){ meishi.setCreateTime(new Date()); // String role = String.valueOf(request.getSession().getAttribute("role")); // if("".equals(role)){ // meishi.set // } meishiService.insert(meishi); return R.ok(); }else { return R.error(511,"表中有相同数据"); } } }
目 录
目 录 III
1 绪论 1
1.1 研究背景 1
1.2 目的和意义 1
1.3 论文结构安排 2
2 相关技术 3
2.1 SSM框架介绍 3
2.2 B/S结构介绍 3
2.3 Mysql数据库介绍 4
3 系统分析 6
3.1 系统可行性分析 6
3.1.1 技术可行性分析 6
3.1.2 经济可行性分析 6
3.1.3 运行可行性分析 6
3.2 系统性能分析 7
3.2.1 易用性指标 7
3.2.2 可扩展性指标 7
3.2.3 健壮性指标 7
3.2.4 安全性指标 8
3.3 系统流程分析 8
3.3.1 操作流程分析 8
3.3.2 登录流程分析 9
3.3.3 信息添加流程分析 10
3.3.4 信息删除流程分析 11
4 系统设计 12
4.1 系统概要设计 12
4.2 系统功能结构设计 12
4.3 数据库设计 13
4.3.1 数据库E-R图设计 13
4.3.2 数据库表结构设计 14
5 系统实现 17
5.1用户信息管理 17
5.2 美食信息管理 17
5.3美食留言管理 18
5.1博主推荐管理 19
6 系统测试 19
6.1 系统测试的特点 20
6.2 系统功能测试 20
6.2.1 登录功能测试 20
6.2.2 添加类别功能测试 20
6.3 测试结果分析 21
结 论 22
致 谢 23
参考文献 24
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。