基于javaweb+jsp的学生疫情健康管理系统

基于javaweb+jsp的学生疫情健康管理系统

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等均可配置运行

适用

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

     * 删除公告
     *
     * @param response
     * @param request
     * @throws IOException
     */
    @RequestMapping("noticeDelete")
    public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {
        Serializable id = Util.decode(request, "id");
        noticeService.delete(Arrays.asList(id));
        this.redirectList(request, response);
    }

    /**
     * 编辑公告
     *
     * @param response
</div>

<!-- info -->
<div class="modal fade" id="modal-info" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <form>
                <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">
                    <table class="table table-striped table-hover" style="font-size: 15px;">
        for (int i = 0; i < 4; i++) {
            //  随机设置当前验证码的字符的字体
            g.setFont(new Font(fontNames[random.nextInt(3)], Font.ITALIC, height));
            //  随机获得当前验证码的字符
            char codeChar = codeChars.charAt(random.nextInt(charsLength));
            validationCode.append(codeChar);
            //  随机设置当前验证码字符的颜色
            g.setColor(getRandomColor(10, 100));
            //  在图形上输出验证码字符,x和y都是随机生成的
            g.drawString(String.valueOf(codeChar), 16 * i + random.nextInt(7), height - random.nextInt(6));
        }
        HttpSession session = request.getSession();
        session.setMaxInactiveInterval(5 * 60);
        return servlet;
    }

    public void setServlet(String servlet) {
        this.servlet = servlet;
    }

    public String getSearchColumn() {
        return searchColumn;
    }

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

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    <insert id="doCreate" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.demo.vo.User">
        INSERT INTO `t_user`
        <trim prefix="(" suffix=")" suffixOverrides=",">
                    <if test ='id != null'>`id`,</if>
                    <if test ='username != null'>`username`,</if>
                    <if test ='password != null'>`password`,</if>
                    <if test ='realName != null'>`real_name`,</if>
                    <if test ='userSex != null'>`user_sex`,</if>
                    <if test ='userPhone != null'>`user_phone`,</if>
                    <if test ='userText != null'>`user_text`,</if>
                    <if test ='userType != null'>`user_type`</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                    <if test ='id != null'>#{id},</if>
                    <if test ='username != null'>#{username},</if>
                    <if test ='password != null'>#{password},</if>
                    <if test ='realName != null'>#{realName},</if>
                    <if test ='userSex != null'>#{userSex},</if>
                    <if test ='userPhone != null'>#{userPhone},</if>

<mapper namespace="com.demo.dao.StudentMapper">

    <resultMap id="BaseResultMap" type="com.demo.vo.Student" >
            <result column="id" property="id" />
            <result column="student_name" property="studentName" />
            <result column="student_age" property="studentAge" />
            <result column="student_sex" property="studentSex" />
            <result column="student_number" property="studentNumber" />
            <result column="student_master" property="studentMaster" />
            <result column="student_class" property="studentClass" />
            <result column="student_phone" property="studentPhone" />
            <result column="student_text" property="studentText" />
    </resultMap>

    <sql id="Base_Column_List">
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * 拦截器
 */
public class LoginInterceptor implements HandlerInterceptor {

    //@Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object o) throws Exception {
        HttpSession session = request.getSession();
        //移除错误提示
                    <if test ='username != null'>`username`,</if>
                    <if test ='password != null'>`password`,</if>
                    <if test ='realName != null'>`real_name`,</if>
                    <if test ='userSex != null'>`user_sex`,</if>
                    <if test ='userPhone != null'>`user_phone`,</if>
                    <if test ='userText != null'>`user_text`,</if>
                    <if test ='userType != null'>`user_type`</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                    <if test ='id != null'>#{id},</if>
                    <if test ='username != null'>#{username},</if>
                    <if test ='password != null'>#{password},</if>
                    <if test ='realName != null'>#{realName},</if>
                    <if test ='userSex != null'>#{userSex},</if>
                    <if test ='userPhone != null'>#{userPhone},</if>
            <result column="id" property="id" />
            <result column="username" property="username" />
            <result column="password" property="password" />
            <result column="real_name" property="realName" />
            <result column="user_sex" property="userSex" />
            <result column="user_phone" property="userPhone" />
            <result column="user_text" property="userText" />
            <result column="user_type" property="userType" />
    </resultMap>

    <sql id="Base_Column_List">
        `id`,`username`,`password`,`real_name`,`user_sex`,`user_phone`,`user_text`,`user_type`
    </sql>

    <!--新增-->
    <insert id="doCreate" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.demo.vo.User">
        INSERT INTO `t_user`
        <trim prefix="(" suffix=")" suffixOverrides=",">
                    <if test ='id != null'>`id`,</if>
                    <if test ='username != null'>`username`,</if>
                    <if test ='password != null'>`password`,</if>
                    <if test ='realName != null'>`real_name`,</if>
                    <if test ='userSex != null'>`user_sex`,</if>
                    <if test ='userPhone != null'>`user_phone`,</if>
                    <div class="form-group hidden">
                        <label class="control-label">(hidden)</label>
                        <input type="text" class="form-control" name="action" value="edit">
                        <input type="text" readonly class="form-control" name="id" id="edit-id">
                    </div>
                    <div class="form-group">
                        <label for="edit-studentName" class="control-label">姓名:</label>
                        <input type="text" class="form-control" name="studentName" id="edit-studentName">
                    </div>
                    <div class="form-group">
                        <label for="edit-studentAge" class="control-label">年龄:</label>
                        <input type="text" class="form-control" name="studentAge" id="edit-studentAge">
                    </div>
                    <div class="form-group">
                        <label class="control-label">性别:</label>
                               <input name="studentSex" id="edit-studentSex_男" type="radio" value=""/><input name="studentSex" id="edit-studentSex_女" type="radio" value=""/></div>
    }
    public String getStudentClass() {
        return studentClass;
    }

    public void setStudentClass(String studentClass) {
        this.studentClass = studentClass;
    }
    public String getStudentPhone() {
        return studentPhone;
    }

    public void setStudentPhone(String studentPhone) {
        this.studentPhone = studentPhone;
    }
    public String getStudentText() {
        return studentText;
    }

    public void setStudentText(String studentText) {
        this.studentText = studentText;
    }
<div class="modal fade" id="modal-info" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <form>
                <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">
                    <table class="table table-striped table-hover" style="font-size: 15px;">

运行环境

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…均可修改

适用

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

功能说明

登录、注册、退出、用户模块、公告模块、学生信息模块、健康模块的增删改查管理

20220319005409

20220319005410

20220319005411

20220319005412

20220319005413

20220319005414

20220319005415

20220319005416

20220319005417

20220319005418

20220319005419

document

  • 0
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值