|
|
|
@ -2,23 +2,23 @@
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.sztzjy.financial_bigdata.mapper.StuUserMapper">
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.StuUser">
|
|
|
|
|
<id column="userid" jdbcType="VARCHAR" property="userid" />
|
|
|
|
|
<result column="zy_userid" jdbcType="INTEGER" property="zyUserid" />
|
|
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
|
|
<result column="student_id" jdbcType="VARCHAR" property="studentId" />
|
|
|
|
|
<result column="class_id" jdbcType="VARCHAR" property="classId" />
|
|
|
|
|
<result column="username" jdbcType="VARCHAR" property="username" />
|
|
|
|
|
<result column="password" jdbcType="VARCHAR" property="password" />
|
|
|
|
|
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
|
|
|
|
<result column="email" jdbcType="VARCHAR" property="email" />
|
|
|
|
|
<result column="major" jdbcType="VARCHAR" property="major" />
|
|
|
|
|
<result column="role_id" jdbcType="INTEGER" property="roleId" />
|
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
|
<result column="school_id" jdbcType="VARCHAR" property="schoolId" />
|
|
|
|
|
<result column="school_name" jdbcType="VARCHAR" property="schoolName" />
|
|
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
|
|
|
<result column="exam_status" jdbcType="VARCHAR" property="examStatus" />
|
|
|
|
|
<result column="system_onwer" jdbcType="VARCHAR" property="systemOnwer" />
|
|
|
|
|
<id column="userid" jdbcType="VARCHAR" property="userid"/>
|
|
|
|
|
<result column="zy_userid" jdbcType="INTEGER" property="zyUserid"/>
|
|
|
|
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
|
|
|
|
<result column="student_id" jdbcType="VARCHAR" property="studentId"/>
|
|
|
|
|
<result column="class_id" jdbcType="VARCHAR" property="classId"/>
|
|
|
|
|
<result column="username" jdbcType="VARCHAR" property="username"/>
|
|
|
|
|
<result column="password" jdbcType="VARCHAR" property="password"/>
|
|
|
|
|
<result column="phone" jdbcType="VARCHAR" property="phone"/>
|
|
|
|
|
<result column="email" jdbcType="VARCHAR" property="email"/>
|
|
|
|
|
<result column="major" jdbcType="VARCHAR" property="major"/>
|
|
|
|
|
<result column="role_id" jdbcType="INTEGER" property="roleId"/>
|
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
|
|
<result column="school_id" jdbcType="VARCHAR" property="schoolId"/>
|
|
|
|
|
<result column="school_name" jdbcType="VARCHAR" property="schoolName"/>
|
|
|
|
|
<result column="status" jdbcType="INTEGER" property="status"/>
|
|
|
|
|
<result column="exam_status" jdbcType="VARCHAR" property="examStatus"/>
|
|
|
|
|
<result column="system_onwer" jdbcType="VARCHAR" property="systemOnwer"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Example_Where_Clause">
|
|
|
|
|
<where>
|
|
|
|
@ -38,7 +38,8 @@
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
@ -67,7 +68,8 @@
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
@ -79,18 +81,20 @@
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
userid, zy_userid, name, student_id, class_id, username, password, phone, email,
|
|
|
|
|
userid
|
|
|
|
|
, zy_userid, name, student_id, class_id, username, password, phone, email,
|
|
|
|
|
major, role_id, create_time, school_id, school_name, status, exam_status, system_onwer
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample" resultMap="BaseResultMap">
|
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample"
|
|
|
|
|
resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
|
</if>
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from stu_userinfo
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
@ -98,18 +102,19 @@
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from stu_userinfo
|
|
|
|
|
where userid = #{userid,jdbcType=VARCHAR}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
delete from stu_userinfo
|
|
|
|
|
delete
|
|
|
|
|
from stu_userinfo
|
|
|
|
|
where userid = #{userid,jdbcType=VARCHAR}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample">
|
|
|
|
|
delete from stu_userinfo
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.StuUser">
|
|
|
|
@ -235,10 +240,11 @@
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample" resultType="java.lang.Long">
|
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuUserExample"
|
|
|
|
|
resultType="java.lang.Long">
|
|
|
|
|
select count(*) from stu_userinfo
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
@ -297,7 +303,7 @@
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByExample" parameterType="map">
|
|
|
|
@ -320,7 +326,7 @@
|
|
|
|
|
exam_status = #{record.examStatus,jdbcType=VARCHAR},
|
|
|
|
|
system_onwer = #{record.systemOnwer,jdbcType=VARCHAR}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause"/>
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.StuUser">
|
|
|
|
@ -399,26 +405,26 @@
|
|
|
|
|
</update>
|
|
|
|
|
<insert id="batchInsertStudents" parameterType="java.util.List">
|
|
|
|
|
INSERT INTO stu_userinfo (userid, name, student_id, class_id, username, password, phone,
|
|
|
|
|
email,major,
|
|
|
|
|
email,major,zy_userid,system_onwer,
|
|
|
|
|
role_id,create_time,school_id,school_name,status) VALUES
|
|
|
|
|
<foreach collection="list" item="student" separator=",">
|
|
|
|
|
(#{student.userid}, #{student.name}, #{student.studentId}, #{student.classId}, #{student.username},
|
|
|
|
|
#{student.password}, #{student.phone}, #{student.email},#{student.major},#{student.roleId},
|
|
|
|
|
#{student.password}, #{student.phone}, #{student.email},#{student.major},#{student.zyUserid},#{student.systemOnwer},#{student.roleId},
|
|
|
|
|
#{student.createTime},#{student.schoolId},#{student.schoolName},#{student.status})
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="UserDtoMap" type="com.sztzjy.financial_bigdata.entity.stu_dto.StuUserDto">
|
|
|
|
|
<result column="school_name" jdbcType="VARCHAR" property="schoolName" />
|
|
|
|
|
<result column="class_name" jdbcType="VARCHAR" property="className" />
|
|
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
|
|
<result column="student_id" jdbcType="VARCHAR" property="studentId" />
|
|
|
|
|
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
|
|
|
|
<result column="email" jdbcType="VARCHAR" property="email" />
|
|
|
|
|
<result column="score" jdbcType="VARCHAR" property="score" />
|
|
|
|
|
<result column="chapter_name" jdbcType="VARCHAR" property="chapterName" />
|
|
|
|
|
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
|
|
|
|
|
<result column="school_name" jdbcType="VARCHAR" property="schoolName"/>
|
|
|
|
|
<result column="class_name" jdbcType="VARCHAR" property="className"/>
|
|
|
|
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
|
|
|
|
<result column="student_id" jdbcType="VARCHAR" property="studentId"/>
|
|
|
|
|
<result column="phone" jdbcType="VARCHAR" property="phone"/>
|
|
|
|
|
<result column="email" jdbcType="VARCHAR" property="email"/>
|
|
|
|
|
<result column="score" jdbcType="VARCHAR" property="score"/>
|
|
|
|
|
<result column="chapter_name" jdbcType="VARCHAR" property="chapterName"/>
|
|
|
|
|
<result column="report_id" jdbcType="VARCHAR" property="reportId"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<select id="selectByCondition" resultMap="UserDtoMap">
|
|
|
|
|