Java+MySQL 基于ssm的老年人健康饮食管理系统#毕业设计

发布时间:2024-11-24 06:13

《老年人健康饮食》- 老年人饮食调理的专业书籍 #生活技巧# #健康生活方式# #健康生活方式书籍# #营养烹饪书籍#

文末获取源码

开发环境

项目编号:Java+MySQL ssm275老年人健康饮食管理系统#毕业设计
开发语言:Java
开发工具:IDEA /Eclipse
数据库:MYSQL5.7
应用服务:Tomcat7/Tomcat8
使用框架:ssm+vue

项目介绍

随着时代的发展,人们的生活水平有了直线的提升,相对于的人们对健康也越来越看重,如何能够更好的健康饮食成为了很多人在吃饱吃好的同时追求的另外一种饮食方式,尤其是随着生活水平的提高,“三高”的现象越来越严重,这种生活方式和饮食方法严重的影响了人们的生活水平的提高,为了能够更好的能人们健康饮食我开发了本系统。
本系统采用了SSM技术,将所有业务模块采用以浏览器交互的模式,选择MySQL作为系统的数据库,开发工具选择eclipse来进行系统的设计。基本实现了老年人健康饮食管理系统应有的主要功能模块,本系统有用户登录,个人中心,用户管理,系统公告管理,饮食搭配管理,饮食类型管理,活动信息管理,活动报名管理,论坛管理,留言板管理,系统管理等内容。
在这里插入图片描述

系统截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

关键代码

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.HuodongxinxiEntity; import com.entity.view.HuodongxinxiView; import com.service.HuodongxinxiService; 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-03 16:50:30 */ @RestController @RequestMapping("/huodongxinxi") public class HuodongxinxiController { @Autowired private HuodongxinxiService huodongxinxiService; /** * 后端列表 */ @RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,HuodongxinxiEntity huodongxinxi, HttpServletRequest request){ EntityWrapper<HuodongxinxiEntity> ew = new EntityWrapper<HuodongxinxiEntity>();PageUtils page = huodongxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, huodongxinxi), params), params));request.setAttribute("data", page); return R.ok().put("data", page); } /** * 前端列表 */@IgnoreAuth @RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,HuodongxinxiEntity huodongxinxi, HttpServletRequest request){ EntityWrapper<HuodongxinxiEntity> ew = new EntityWrapper<HuodongxinxiEntity>();PageUtils page = huodongxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, huodongxinxi), params), params));request.setAttribute("data", page); return R.ok().put("data", page); }/** * 列表 */ @RequestMapping("/lists") public R list( HuodongxinxiEntity huodongxinxi){EntityWrapper<HuodongxinxiEntity> ew = new EntityWrapper<HuodongxinxiEntity>();ew.allEq(MPUtil.allEQMapPre( huodongxinxi, "huodongxinxi")); return R.ok().put("data", huodongxinxiService.selectListView(ew)); } /** * 查询 */ @RequestMapping("/query") public R query(HuodongxinxiEntity huodongxinxi){ EntityWrapper< HuodongxinxiEntity> ew = new EntityWrapper< HuodongxinxiEntity>();ew.allEq(MPUtil.allEQMapPre( huodongxinxi, "huodongxinxi"));HuodongxinxiView huodongxinxiView = huodongxinxiService.selectView(ew);return R.ok("查询活动信息成功").put("data", huodongxinxiView); } /** * 后端详情 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ HuodongxinxiEntity huodongxinxi = huodongxinxiService.selectById(id); return R.ok().put("data", huodongxinxi); } /** * 前端详情 */ @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ HuodongxinxiEntity huodongxinxi = huodongxinxiService.selectById(id); return R.ok().put("data", huodongxinxi); } /** * 后端保存 */ @RequestMapping("/save") public R save(@RequestBody HuodongxinxiEntity huodongxinxi, HttpServletRequest request){huodongxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(huodongxinxi); huodongxinxiService.insert(huodongxinxi); return R.ok(); } /** * 前端保存 */ @RequestMapping("/add") public R add(@RequestBody HuodongxinxiEntity huodongxinxi, HttpServletRequest request){huodongxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(huodongxinxi); huodongxinxiService.insert(huodongxinxi); return R.ok(); } /** * 修改 */ @RequestMapping("/update") public R update(@RequestBody HuodongxinxiEntity huodongxinxi, HttpServletRequest request){ //ValidatorUtils.validateEntity(huodongxinxi); huodongxinxiService.updateById(huodongxinxi);//全部更新 return R.ok(); } /** * 删除 */ @RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ huodongxinxiService.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<HuodongxinxiEntity> wrapper = new EntityWrapper<HuodongxinxiEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = huodongxinxiService.selectCount(wrapper);return R.ok().put("count", count);} }

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210

网址:Java+MySQL 基于ssm的老年人健康饮食管理系统#毕业设计 https://www.yuejiaxmz.com/news/view/228598

相关内容

java计算机毕业设计企业员工管理系统源码+程序+lw文档+mysql数据库
java健康饮食管理系统(ssm)
Springboot/java/node/python/php教务管理系统【2024年毕设】
【毕业设计】基于ssm框架的社区旧物上门回收管理系统
【开题报告】基于SSM的健康饮食系统设计与实现
基于App的饮食健康管理系统(源码+开题)
ssm健康饮食推荐系统分析与设计 毕业设计
个人健康管理系统 毕业设计 JAVA+Vue+SpringBoot+MySQL
二手家电交易系统(SpringBoot,SSM,MySQL)
java毕业设计基于微信小程序的健康饮食信息管理系统[附源码]

随便看看