基于javaweb+jsp的校友信息管理系统

基于javaweb+jsp的校友信息管理系统

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Layui Ajax

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

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

适用

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

                        console.log("已删除!");
                    }
                });
                obj.del(); //删除对应行(tr)的DOM结构,并更新缓存
                //parent.location.reload();//刷新父级页面
                // layer.close(index);
                //parent.location.reload();//刷新父级页面
                layer.msg(data.fengcaiName + ' 删除成功!');
                // });
            } else if (layEvent === 'edit') { //编辑
                layer.open({
                    type: 2,
                    area: ['800px', '550px'],
                    fixed: false, //不固定
                    maxmin: true,
                    content: 'fengcaiEditPre?id=' + data.id
                });
        Serializable id = Util.decode(request, "id");
        xiaoyouService.delete(Arrays.asList(id));
        this.redirectList(request, response);
    }

    /**
     * 编辑校友
     *
     * @param response
     * @param request
     * @throws IOException
     */
    @RequestMapping("xiaoyouEdit")
    public void edit(HttpServletResponse response, HttpServletRequest request) throws IOException {
        Xiaoyou vo = new Xiaoyou();
        vo.setId(Long.valueOf(Util.decode(request, "id")));
        vo.setXiaoyouName(Util.decode(request, "xiaoyouName"));
        vo.setXiaoyouSex(Util.decode(request, "xiaoyouSex"));
        vo.setXiaoyouBirthday(Util.decode(request, "xiaoyouBirthday"));
        vo.setXiaoyouBanji(Util.decode(request, "xiaoyouBanji"));
        vo.setXiaoyouPhone(Util.decode(request, "xiaoyouPhone"));
        vo.setXiaoyouJob(Util.decode(request, "xiaoyouJob"));
        vo.setXiaoyouDanwei(Util.decode(request, "xiaoyouDanwei"));
        vo.setXiaoyouCity(Util.decode(request, "xiaoyouCity"));
        vo.setXiaoyouText(Util.decode(request, "xiaoyouText"));
            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最大不会超过255
        if (minColor > 255)
            minColor = 255;
        //  保存minColor最大不会超过255
        if (maxColor > 255)
            maxColor = 255;
        //  获得红色的随机颜色值
        int red = minColor + random.nextInt(maxColor - minColor);
        //  获得绿色的随机颜色值
        int green = minColor + random.nextInt(maxColor - minColor);
        //  获得蓝色的随机颜色值
        int blue = minColor + random.nextInt(maxColor - minColor);
        return new Color(red, green, blue);
    <!--修改-->
    <update id="doUpdate" parameterType="com.demo.vo.Xiaoyou">
        UPDATE `t_xiaoyou`
        <set>
                <if test ='id != null'>`id` = #{id},</if>
                <if test ='xiaoyouName != null'>`xiaoyou_name` = #{xiaoyouName},</if>
                <if test ='xiaoyouSex != null'>`xiaoyou_sex` = #{xiaoyouSex},</if>
                <if test ='xiaoyouBirthday != null'>`xiaoyou_birthday` = #{xiaoyouBirthday},</if>
                <if test ='xiaoyouBanji != null'>`xiaoyou_banji` = #{xiaoyouBanji},</if>
                <if test ='xiaoyouPhone != null'>`xiaoyou_phone` = #{xiaoyouPhone},</if>
                <if test ='xiaoyouJob != null'>`xiaoyou_job` = #{xiaoyouJob},</if>
                <if test ='xiaoyouDanwei != null'>`xiaoyou_danwei` = #{xiaoyouDanwei},</if>
                <if test ='xiaoyouCity != null'>`xiaoyou_city` = #{xiaoyouCity},</if>
                <if test ='xiaoyouText != null'>`xiaoyou_text` = #{xiaoyouText}</if>
        </set>
        WHERE `id` = #{id}
    </update>

    <!--获取-->
    <select id="findById" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" /> FROM `t_xiaoyou` WHERE `id` = #{id}
    </select>
                            title: '姓名',
                            templet: vo => (vo = vo.fengcaiName) ? '<a href="#" style="color: #009688;">' + vo + '</a>' : '',
                            event: 'info',
                        },
                        {
                            field: 'fengcaiClass',
                            title: '班级',
                        },
                        {
                            field: 'fengcaiCompany',
                            title: '工作单位',
                        },
                        {
                            field: 'fengcaiJob',
                            title: '职业',
                        },

    /**
     * 跳转到列表页面
     *
     * @param request
     * @param response
     */
    private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {
        //查询列和关键字
        String searchColumn = Util.decode(request, "searchColumn");
        String keyword = Util.decode(request, "keyword");
        Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)
        params.put("searchColumn", searchColumn);//要查询的列
                            field: 'userSex',
                            title: '性别',
                            templet: vo => vo.userSex ? vo.userSex : "",
                        },
                        {
                            field: 'userPhone',
                            title: '手机',
                        },
                        {
                            field: 'userText',
                            title: '备注',
                        },
                        {
                            field: 'userType',
                            title: '类型',
                            templet: vo => vo.userType ? vo.userType : "",
                        },
                    {
                        align: 'center',
                        fixed: 'right',
                        title: '操作',
                        width: 130,
                        templet: vo => {
            } else if (layEvent === 'info') { //详情
                layer.open({
                    type: 2,
                    area: ['800px', '650px'],
                    fixed: false, //不固定
                    maxmin: true,
                    content: 'fengcaiGet?id=' + data.id
                });
                obj.update({});//同步更新缓存对应的值
            } else if (layEvent === 'LAYTABLE_TIPS') {
                layer.alert('Hi,头部工具栏扩展的右侧图标。');
            }
        });
        //头工具栏事件
        table.on('toolbar(myTable)', function (obj) {
            if ('add' == obj.event) {
                layer.msg('添加');
                layer.open({
                    type: 2,
                    area: ['800px', '550px'],
                    fixed: false, //不固定
                    maxmin: true,
     * @param response
     * @param request
     * @throws IOException
     */
    @RequestMapping("juanEdit")
    public void edit(HttpServletResponse response, HttpServletRequest request) throws IOException {
        Juan vo = new Juan();
        vo.setId(Long.valueOf(Util.decode(request, "id")));
        vo.setJuanName(Util.decode(request, "juanName"));
        vo.setJuanRen(Util.decode(request, "juanRen"));
        vo.setJuanSex(Util.decode(request, "juanSex"));
        vo.setJuanPhone(Util.decode(request, "juanPhone"));
        vo.setJuanDate(Util.decode(request, "juanDate"));
        vo.setJuanText(Util.decode(request, "juanText"));
        juanService.update(vo);
        this.redirectList(request, response);
    }

    /**
     * 获取捐赠的详细信息(详情页面与编辑页面要显示该捐赠的详情)并跳转回页面
     *
     * @param response
     * @param request
     * @throws IOException
     */
    @RequestMapping({"juanGet", "juanEditPre"})
    public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {
                    fixed: false, //不固定
                    maxmin: true,
                    content: 'fengcai_add.jsp'
                });
            } else {
                //layer.alert('这是工具栏右侧自定义的一个图标按钮');
            }
        });
        //搜索
        let $ = layui.$, active = {
            reload: function () {
                let url = 'fengcaiList?keyword=' + $('#search_keyword').val() + '&searchColumn=' + $('#searchColumn').val();
                //执行重载
                table.reload('myTable', {

运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

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

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Layui Ajax

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

适用

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

功能说明

登录、注册、退出、用户模块、公告模块、校友模块、校友风采模块、捐赠模块的增删改查管理

20220319005301

20220319005302

20220319005303

20220319005304

20220319005305

20220319005306

20220319005307

20220319005308

20220319005309

20220319005310

20220319005311

20220319005312

document

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值