|
|
|
@ -16,6 +16,7 @@
|
|
|
|
|
<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" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Example_Where_Clause">
|
|
|
|
|
<where>
|
|
|
|
@ -35,8 +36,7 @@
|
|
|
|
|
</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>
|
|
|
|
@ -65,8 +65,7 @@
|
|
|
|
|
</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>
|
|
|
|
@ -78,12 +77,10 @@
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
userid
|
|
|
|
|
, name, student_id, class_id, username, password, phone, email, major, role_id,
|
|
|
|
|
create_time, school_id, school_name, status
|
|
|
|
|
userid, name, student_id, class_id, username, password, phone, email, major, role_id,
|
|
|
|
|
create_time, school_id, school_name, status, exam_status
|
|
|
|
|
</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
|
|
|
|
@ -104,8 +101,7 @@
|
|
|
|
|
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">
|
|
|
|
@ -119,12 +115,14 @@
|
|
|
|
|
class_id, username, password,
|
|
|
|
|
phone, email, major,
|
|
|
|
|
role_id, create_time, school_id,
|
|
|
|
|
school_name, status)
|
|
|
|
|
school_name, status, exam_status
|
|
|
|
|
)
|
|
|
|
|
values (#{userid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{studentId,jdbcType=VARCHAR},
|
|
|
|
|
#{classId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
|
|
#{phone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{major,jdbcType=VARCHAR},
|
|
|
|
|
#{roleId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{schoolId,jdbcType=VARCHAR},
|
|
|
|
|
#{schoolName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER})
|
|
|
|
|
#{schoolName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{examStatus,jdbcType=VARCHAR}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.StuUser">
|
|
|
|
|
insert into stu_userinfo
|
|
|
|
@ -171,6 +169,9 @@
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
status,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="examStatus != null">
|
|
|
|
|
exam_status,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="userid != null">
|
|
|
|
@ -215,10 +216,12 @@
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
#{status,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="examStatus != null">
|
|
|
|
|
#{examStatus,jdbcType=VARCHAR},
|
|
|
|
|
</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" />
|
|
|
|
@ -269,6 +272,9 @@
|
|
|
|
|
<if test="record.status != null">
|
|
|
|
|
status = #{record.status,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.examStatus != null">
|
|
|
|
|
exam_status = #{record.examStatus,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
@ -289,7 +295,8 @@
|
|
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
school_id = #{record.schoolId,jdbcType=VARCHAR},
|
|
|
|
|
school_name = #{record.schoolName,jdbcType=VARCHAR},
|
|
|
|
|
status = #{record.status,jdbcType=INTEGER}
|
|
|
|
|
status = #{record.status,jdbcType=INTEGER},
|
|
|
|
|
exam_status = #{record.examStatus,jdbcType=VARCHAR}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
@ -336,6 +343,9 @@
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="examStatus != null">
|
|
|
|
|
exam_status = #{examStatus,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where userid = #{userid,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
@ -353,10 +363,10 @@
|
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
school_id = #{schoolId,jdbcType=VARCHAR},
|
|
|
|
|
school_name = #{schoolName,jdbcType=VARCHAR},
|
|
|
|
|
status = #{status,jdbcType=INTEGER}
|
|
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
|
|
exam_status = #{examStatus,jdbcType=VARCHAR}
|
|
|
|
|
where userid = #{userid,jdbcType=VARCHAR}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsertStudents" parameterType="java.util.List">
|
|
|
|
|
INSERT INTO stu_userinfo (userid, name, student_id, class_id, username, password, phone,
|
|
|
|
|
school_name,email,major,
|
|
|
|
@ -409,9 +419,11 @@
|
|
|
|
|
WHERE class_id IN (SELECT class_id
|
|
|
|
|
FROM tea_and_student_exam
|
|
|
|
|
WHERE exam_manage_id = #{examManageId}
|
|
|
|
|
<if test='classId != null and classId != ""'>
|
|
|
|
|
<if test="classId != null and classId != """>
|
|
|
|
|
AND class_id = #{classId}
|
|
|
|
|
</if>
|
|
|
|
|
)GROUP BY class_id ) AS subquery;
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|