栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

基于javaweb+jsp的蛋糕房订购信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

基于javaweb+jsp的蛋糕房订购信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap

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

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

适用

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

                                
                                
                            


    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
        Map params = new HashMap();
        params.put("searchColumn", "username");//使用`username`字段进行模糊查询
        params.put("keyword", username);
        List list = (List) userService.list(params).get("list");
        for (User user : list) {
            if (user.getUsername().equals(username) && user.getPassword().equals(password)) {//找到这个管理员了
                request.getSession().setAttribute("loginUser", user);
                request.getRequestDispatcher("menu.jsp").forward(request, response);
                return;
            }
        }
        request.getSession().setAttribute("alert_msg", "错误:用户名或密码错误!");
        request.getRequestDispatcher("login.jsp").forward(request, response);
    }

    @RequestMapping("authRegister")
    public void register(HttpServletResponse response, HttpServletRequest request) throws IOException, ServletException {
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;

@Controller
public class AuthController extends HttpServlet {
    @Autowired
    private UserService userService;

    @RequestMapping("authLogin")
    public void login(HttpServletResponse response, HttpServletRequest request) throws IOException, ServletException {
        String username = Util.decode(request, "username");
        String password = Util.decode(request, "password");

        String validationCode = Util.decode(request, "validationCode");
        if (validationCode != null && !validationCode.equals(request.getSession().getAttribute("validationCode"))) {//验证码不通过
    public void setUserType(String userType) {
        this.userType = userType;
    }
}
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>


    
    订购编辑
    <%@ include file="include/head.jsp" %>


    public void setSearchColumn(String searchColumn) {
        this.searchColumn = searchColumn;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }
}
package com.demo.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.text.SimpleDateFormat;


public class Util {
    
public class Order implements Serializable {
    private Long id;//主键
    private String cakeName;//商品名
    }

    public int getTotalRecord() {
        return totalRecord;
    }

    public void setTotalRecord(int totalRecord) {
        this.totalRecord = totalRecord;
    }

    //--分页逻辑
    //已知数据
    private int pageNum;//当前页,从请求那边传过来。
    private int pageSize;//每页显示的数据条数。
    //需要计算得来
    private int totalPage;    //总页数,通过totalRecord和pageSize计算可以得来
    //开始索引,也就是我们在数据库中要从第几行数据开始拿,有了startIndex和pageSize,
    //就知道了limit语句的两个数据,就能获得每页需要显示的数据了
    private int startIndex;
    //分页显示的页数,比如在页面上显示1,2,3,4,5页,start就为1,end就为5,这个也是算过来的
    private int start;
    private int end;
     * @param request
     * @throws IOException
     */
    @RequestMapping("shangpingDelete")
    public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {
        Serializable id = Util.decode(request, "id");
        shangpingService.delete(Arrays.asList(id));
        this.redirectList(request, response);
    }

    /**
     * 编辑蛋糕
     *
     * @param response
     * @param request
     * @throws IOException
    
        DELETE FROM `t_notice` WHERe `id` IN
        
            #{id}
        
    

    
    
        UPDATE `t_notice`
        
                `id` = #{id},
                `notice_name` = #{noticeName},
                `notice_text` = #{noticeText},
                `notice_type` = #{noticeType},
                `create_date` = #{createDate}
        
        WHERe `id` = #{id}
    

    
    

运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

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

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap

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

适用

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

功能说明

登录、注册、退出、用户模块、公告模块、订购模块、蛋糕模块的增删改查管理

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/832002.html

Java相关栏目本月热门文章

我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号