基于javaweb+jsp的饮食营养健康管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap Ajax)

编程入门 行业动态 更新时间:2024-10-09 21:22:59

基于javaweb+jsp的饮食营养健康<a href=https://www.elefans.com/category/jswz/34/1769858.html style=管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap Ajax)"/>

基于javaweb+jsp的饮食营养健康管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap Ajax)

基于javaweb+jsp的饮食营养健康管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap Ajax)

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap Ajax

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改

开发工具:eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

    <script src="js/bootstrap.js"></script>
</head><body>
<nav class="navbar navbar-inverse navbar-fixed-top"><div class="container-fluid"><div class="navbar-header"><button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"><span class="sr-only">饮食营养健康管理系统</span> <span class="icon-bar"></span><span class="icon-bar"></span> <span class="icon-bar"></span></button><a class="navbar-brand" href="#">饮食营养健康管理系统</a></div><div id="navbar" class="navbar-collapse collapse"><ul class="nav navbar-nav navbar-right"><li><a href="#">欢迎:<span style="color: yellow">${loginUser.username}</span></a></li>
                    <if test ='noticeType != null'>`notice_type`,</if><if test ='createDate != null'>`create_date`</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test ='id != null'>#{id},</if><if test ='noticeName != null'>#{noticeName},</if><if test ='noticeText != null'>#{noticeText},</if><if test ='noticeType != null'>#{noticeType},</if><if test ='createDate != null'>#{createDate}</if></trim></insert><!--批量删除--><delete id="doRemoveBatch" parameterType="java.util.Collection">DELETE FROM `t_notice` WHERE `id` IN<foreach collection="list" item="id" separator="," open="(" close=")">
                str = new String(str.getBytes("ISO-8859-1"), "GBK");}if (isMessyCode(str)) {str = new String(str.getBytes("GB2312"), "GBK");}} catch (Exception e) {e.printStackTrace();}System.out.println(parameterName + "==" + str.trim());return str.trim();}
}
package com.demo.util;import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;import javax.servlet.http.HttpServletRequest;
                                modal.find('#edit-userType_' + vo.userType).removeAttr("checked");}};}})})$('#modal-info').on('show.bs.modal', function (event) {let button = $(event.relatedTarget);let id = button.data('id');let modal = $(this);$.ajax({url: 'userGet?id=' + id,type: "get",success: function (voString) {let vo = eval('(' + voString + ')');modal.find('#info-username').text(vo.username);modal.find('#info-password').text(vo.password);
                str = new String(str.getBytes("GBK"), "ISO-8859-1");}if (isMessyCode(str)) {str = new String(str.getBytes("UTF-8"), "GB2312");}if (isMessyCode(str)) {str = new String(str.getBytes("ISO-8859-1"), "GB2312");}if (isMessyCode(str)) {str = new String(str.getBytes("GBK"), "GB2312");}if (isMessyCode(str)) {str = new String(str.getBytes("UTF-8"), "GBK");}if (isMessyCode(str)) {str = new String(str.getBytes("ISO-8859-1"), "GBK");}if (isMessyCode(str)) {str = new String(str.getBytes("GB2312"), "GBK");}} catch (Exception e) {e.printStackTrace();}System.out.println(parameterName + "==" + str.trim());return str.trim();}
                </td><th style="text-align: center;"><button class="btn btn-pill btn-line btn-danger btn-sm" data-id="${vo.id}"data-toggle="modal" data-target="#modal-info">详情</button><button class="btn btn-pill btn-line btn-danger btn-sm"<c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if>data-id="${vo.id}"data-toggle="modal" data-target="#modal-edit">编辑</button><button class="btn btn-pill btn-line btn-default btn-sm" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> data-id="${vo.id}"data-toggle="modal" data-target="#modal-delete">删除</button></th></tr></c:forEach></tbody>
                        <c:out value="${vo.foodText}"/></c:otherwise></c:choose></td><th style="text-align: center;"><button class="btn btn-pill btn-line btn-danger btn-sm" data-id="${vo.id}"data-toggle="modal" data-target="#modal-info">详情</button><button class="btn btn-pill btn-line btn-danger btn-sm"<c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if>data-id="${vo.id}"data-toggle="modal" data-target="#modal-edit">编辑</button><button class="btn btn-pill btn-line btn-default btn-sm" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> data-id="${vo.id}"data-toggle="modal" data-target="#modal-delete">删除</button></th></tr></c:forEach></tbody></table></div><div style="float: right;padding-right: 10px;color: #515151;"><jsp:include page="split.jsp"/></div></div></div>
</div>
        vo.setUserText(Util.decode(request, "userText"));vo.setUserType(Util.decode(request, "userType"));//调用Service层的增加(insert)方法userService.insert(vo);this.redirectList(request, response);}/*** 删除用户** @param response* @param request* @throws IOException*/@RequestMapping("userDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = Util.decode(request, "id");userService.delete(Arrays.asList(id));this.redirectList(request, response);}/*** 编辑用户** @param response
<div class="modal fade" id="modal-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><form action="foodDelete"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title">删除食材信息</h4></div><div class="modal-body">确认要删除该食材信息记录吗?<div class="form-group hidden"><label class="control-label">(hidden)</label><input type="hidden" class="form-control" name="action" value="delete">
        String msg;User loginUser = (User) request.getSession().getAttribute("loginUser");String oldPassword = Util.decode(request, "oldPassword");if (!loginUser.getPassword().equals(oldPassword)) {msg = "原密码错误!";} else {String newPassword = Util.decode(request, "newPassword");loginUser.setPassword(newPassword);this.userService.update(loginUser);msg = "修改成功!";}request.getSession().setAttribute("alert_msg", msg);request.getRequestDispatcher("reset_password.jsp").forward(request, response);}// 返回一个随机颜色(Color对象)private Color getRandomColor(int minColor, int maxColor) {Random random = new Random();// 保存minColor最大不会超过255if (minColor > 255)minColor = 255;
     * 删除食疗处方** @param response* @param request* @throws IOException*/@RequestMapping("shiliaoDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = Util.decode(request, "id");shiliaoService.delete(Arrays.asList(id));this.redirectList(request, response);}/*** 编辑食疗处方** @param response* @param request

运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap Ajax

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

登录、注册、退出、用户模块、公告模块、食材信息模块、食疗处方模块的增删改查管理

更多推荐

基于javaweb+jsp的饮食营养健康管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap Ajax

本文发布于:2024-02-07 10:54:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1756395.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:管理系统   营养   饮食   健康   JavaWeb

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!