基于javaweb+jsp的校园家教兼职信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)

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

适用

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

                    <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>
                    <if test ='userText != null'>#{userText},</if>
                    <if test ='userType != null'>#{userType}</if>
        </trim>
    </insert>

    <!--批量删除-->
    <delete id="doRemoveBatch" parameterType="java.util.Collection">
        DELETE FROM `t_user` WHERE `id` IN
        <foreach collection="list" item="id" separator="," open="(" close=")">
            #{id}
        </foreach>
    </delete>

    <!--修改-->
    <update id="doUpdate" parameterType="com.demo.vo.User">
        UPDATE `t_user`
    public void setJiaoyuanXueli(String jiaoyuanXueli) {
        this.jiaoyuanXueli = jiaoyuanXueli;
    }
    public String getJiaoyuanPhone() {
        return jiaoyuanPhone;
    }

    public void setJiaoyuanPhone(String jiaoyuanPhone) {
        this.jiaoyuanPhone = jiaoyuanPhone;
    }
    public String getJiaoyuanNeirong() {
        return jiaoyuanNeirong;
    }

    public void setJiaoyuanNeirong(String jiaoyuanNeirong) {
        this.jiaoyuanNeirong = jiaoyuanNeirong;
    }
        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);
    }
}
package com.demo.controller;

import com.demo.util.Util;
                <if test ='noticeText != null'>`notice_text` = #{noticeText},</if>
                <if test ='noticeType != null'>`notice_type` = #{noticeType},</if>
                <if test ='createDate != null'>`create_date` = #{createDate}</if>
        </set>
        WHERE `id` = #{id}
    </update>

    <!--获取-->
    <select id="findById" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" /> FROM `t_notice` WHERE `id` = #{id}
    </select>

    <!--列表-->
    <select id="findAllSplit" parameterType="java.util.Map" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" /> FROM `t_notice`
        <where>
            <if test="searchColumn != null and searchColumn != '' and keyword != null and keyword != ''">
                ${searchColumn} LIKE CONCAT('%',#{keyword},'%')  AND
            </if>
            1=1
     * @param request
     * @throws IOException
     */
    @RequestMapping("noticeList")
    public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {
        this.redirectList(request, response);
    }

    /**
     * 跳转到列表页面
     *
     * @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);//要查询的列
        params.put("keyword", keyword);//查询的关键字
        Map<String, Object> map = noticeService.list(params);
    </select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

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

    <resultMap id="BaseResultMap" type="com.demo.vo.User" >
            <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>
        StringBuilder validationCode = new StringBuilder();
        //  验证码的随机字体
        String[] fontNames = {"Times New Roman", "Book antiqua", "Arial"};
        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));
        }
        if (document.getElementById("xueyuanDate").value.trim().length == 0) {
            alert("期望时间不能为空!");
            return false;
        }
        if (document.getElementById("xueyuanPrice").value.trim().length == 0) {
            alert("期望价格不能为空!");
            return false;
        }
        return true;
    }
</script>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

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

    <resultMap id="BaseResultMap" type="com.demo.vo.Jiaoyuan" >
            <result column="id" property="id" />
            <result column="jiaoyuan_name" property="jiaoyuanName" />
            <result column="jiaoyuan_age" property="jiaoyuanAge" />
            <result column="jiaoyuan_sex" property="jiaoyuanSex" />
            <result column="jiaoyuan_xueli" property="jiaoyuanXueli" />
            <result column="jiaoyuan_phone" property="jiaoyuanPhone" />
            <result column="jiaoyuan_neirong" property="jiaoyuanNeirong" />
            <result column="jiaoyuan_price" property="jiaoyuanPrice" />
            <result column="jiaoyuan_date" property="jiaoyuanDate" />

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getXueyuanName() {
        return xueyuanName;
    }

    public void setXueyuanName(String xueyuanName) {
        this.xueyuanName = xueyuanName;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * 增加用户
     *
            alert("联系方式不能为空!");
            return false;
        }
        if (document.getElementById("jiaoyuanNeirong").value.trim().length == 0) {
            alert("教学项目不能为空!");
            return false;
        }
        if (document.getElementById("jiaoyuanPrice").value.trim().length == 0) {
            alert("时薪不能为空!");
            return false;
        }
        if (document.getElementById("jiaoyuanDate").value.trim().length == 0) {
            alert("授课时间不能为空!");
            return false;

运行环境

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

适用

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

功能说明

登录、注册、退出、用户模块、公告模块、教员模块、学员模块的增删改查管理

20220319005335

20220319005336

20220319005337

20220319005338

20220319005339

20220319005340

20220319005341

20220319005342

20220319005343

20220319005344

20220319005345

20220319005346

document

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值