|
|
@ -17,7 +17,8 @@
|
|
|
|
<result column="judge_score" jdbcType="DECIMAL" property="judgeScore"/>
|
|
|
|
<result column="judge_score" jdbcType="DECIMAL" property="judgeScore"/>
|
|
|
|
<result column="case_score" jdbcType="DECIMAL" property="caseScore"/>
|
|
|
|
<result column="case_score" jdbcType="DECIMAL" property="caseScore"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs">
|
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs"
|
|
|
|
|
|
|
|
type="com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs">
|
|
|
|
<result column="single_idList" jdbcType="LONGVARCHAR" property="singleIdlist"/>
|
|
|
|
<result column="single_idList" jdbcType="LONGVARCHAR" property="singleIdlist"/>
|
|
|
|
<result column="many_idList" jdbcType="LONGVARCHAR" property="manyIdlist"/>
|
|
|
|
<result column="many_idList" jdbcType="LONGVARCHAR" property="manyIdlist"/>
|
|
|
|
<result column="judge_idList" jdbcType="LONGVARCHAR" property="judgeIdlist"/>
|
|
|
|
<result column="judge_idList" jdbcType="LONGVARCHAR" property="judgeIdlist"/>
|
|
|
@ -44,7 +45,8 @@
|
|
|
|
</when>
|
|
|
|
</when>
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
and ${criterion.condition}
|
|
|
|
and ${criterion.condition}
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
|
|
|
separator=",">
|
|
|
|
#{listItem}
|
|
|
|
#{listItem}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</when>
|
|
|
|
</when>
|
|
|
@ -73,7 +75,8 @@
|
|
|
|
</when>
|
|
|
|
</when>
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
and ${criterion.condition}
|
|
|
|
and ${criterion.condition}
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
|
|
|
|
|
|
|
separator=",">
|
|
|
|
#{listItem}
|
|
|
|
#{listItem}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</when>
|
|
|
|
</when>
|
|
|
@ -85,15 +88,18 @@
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
exam_manage_id, school_id, user_id, exam_name, start_time, end_time, logo_address,
|
|
|
|
exam_manage_id
|
|
|
|
|
|
|
|
, school_id, user_id, exam_name, start_time, end_time, logo_address,
|
|
|
|
exam_Description, Objective_weight, case_weight, single_score, many_score, judge_score,
|
|
|
|
exam_Description, Objective_weight, case_weight, single_score, many_score, judge_score,
|
|
|
|
case_score
|
|
|
|
case_score
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
<sql id="Blob_Column_List">
|
|
|
|
<sql id="Blob_Column_List">
|
|
|
|
single_idList, many_idList, judge_idList, case_idList, single_answer, many_answer,
|
|
|
|
single_idList
|
|
|
|
|
|
|
|
, many_idList, judge_idList, case_idList, single_answer, many_answer,
|
|
|
|
judge_answer
|
|
|
|
judge_answer
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageExample" resultMap="ResultMapWithBLOBs">
|
|
|
|
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageExample"
|
|
|
|
|
|
|
|
resultMap="ResultMapWithBLOBs">
|
|
|
|
select
|
|
|
|
select
|
|
|
|
<if test="distinct">
|
|
|
|
<if test="distinct">
|
|
|
|
distinct
|
|
|
|
distinct
|
|
|
@ -109,7 +115,8 @@
|
|
|
|
order by ${orderByClause}
|
|
|
|
order by ${orderByClause}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageExample" resultMap="BaseResultMap">
|
|
|
|
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageExample"
|
|
|
|
|
|
|
|
resultMap="BaseResultMap">
|
|
|
|
select
|
|
|
|
select
|
|
|
|
<if test="distinct">
|
|
|
|
<if test="distinct">
|
|
|
|
distinct
|
|
|
|
distinct
|
|
|
@ -132,7 +139,8 @@
|
|
|
|
where exam_manage_id = #{examManageId,jdbcType=VARCHAR}
|
|
|
|
where exam_manage_id = #{examManageId,jdbcType=VARCHAR}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
delete from tea_exam_manage
|
|
|
|
delete
|
|
|
|
|
|
|
|
from tea_exam_manage
|
|
|
|
where exam_manage_id = #{examManageId,jdbcType=VARCHAR}
|
|
|
|
where exam_manage_id = #{examManageId,jdbcType=VARCHAR}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageExample">
|
|
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageExample">
|
|
|
@ -148,16 +156,17 @@
|
|
|
|
case_weight, single_score, many_score,
|
|
|
|
case_weight, single_score, many_score,
|
|
|
|
judge_score, case_score, single_idList,
|
|
|
|
judge_score, case_score, single_idList,
|
|
|
|
many_idList, judge_idList, case_idList,
|
|
|
|
many_idList, judge_idList, case_idList,
|
|
|
|
single_answer, many_answer, judge_answer
|
|
|
|
single_answer, many_answer, judge_answer)
|
|
|
|
)
|
|
|
|
|
|
|
|
values (#{examManageId,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR},
|
|
|
|
values (#{examManageId,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR},
|
|
|
|
#{examName,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
#{examName,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
#{logoAddress,jdbcType=VARCHAR}, #{examDescription,jdbcType=VARCHAR}, #{objectiveWeight,jdbcType=DECIMAL},
|
|
|
|
#{logoAddress,jdbcType=VARCHAR}, #{examDescription,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{objectiveWeight,jdbcType=DECIMAL},
|
|
|
|
#{caseWeight,jdbcType=DECIMAL}, #{singleScore,jdbcType=DECIMAL}, #{manyScore,jdbcType=DECIMAL},
|
|
|
|
#{caseWeight,jdbcType=DECIMAL}, #{singleScore,jdbcType=DECIMAL}, #{manyScore,jdbcType=DECIMAL},
|
|
|
|
#{judgeScore,jdbcType=DECIMAL}, #{caseScore,jdbcType=DECIMAL}, #{singleIdlist,jdbcType=LONGVARCHAR},
|
|
|
|
#{judgeScore,jdbcType=DECIMAL}, #{caseScore,jdbcType=DECIMAL}, #{singleIdlist,jdbcType=LONGVARCHAR},
|
|
|
|
#{manyIdlist,jdbcType=LONGVARCHAR}, #{judgeIdlist,jdbcType=LONGVARCHAR}, #{caseIdlist,jdbcType=LONGVARCHAR},
|
|
|
|
#{manyIdlist,jdbcType=LONGVARCHAR}, #{judgeIdlist,jdbcType=LONGVARCHAR},
|
|
|
|
#{singleAnswer,jdbcType=LONGVARCHAR}, #{manyAnswer,jdbcType=LONGVARCHAR}, #{judgeAnswer,jdbcType=LONGVARCHAR}
|
|
|
|
#{caseIdlist,jdbcType=LONGVARCHAR},
|
|
|
|
)
|
|
|
|
#{singleAnswer,jdbcType=LONGVARCHAR}, #{manyAnswer,jdbcType=LONGVARCHAR},
|
|
|
|
|
|
|
|
#{judgeAnswer,jdbcType=LONGVARCHAR})
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs">
|
|
|
|
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs">
|
|
|
|
insert into tea_exam_manage
|
|
|
|
insert into tea_exam_manage
|
|
|
@ -292,7 +301,8 @@
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageExample" resultType="java.lang.Long">
|
|
|
|
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaExamManageExample"
|
|
|
|
|
|
|
|
resultType="java.lang.Long">
|
|
|
|
select count(*) from tea_exam_manage
|
|
|
|
select count(*) from tea_exam_manage
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
@ -525,11 +535,27 @@
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBySchoolId" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
|
|
|
<select id="selectBySchoolId" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
|
|
|
select
|
|
|
|
select
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
from tea_exam_manage
|
|
|
|
from tea_exam_manage
|
|
|
|
where school_id = #{schoolId,jdbcType=VARCHAR}
|
|
|
|
where school_id = #{schoolId,jdbcType=VARCHAR}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="ReceiveDto" type="com.sztzjy.financial_bigdata.entity.stu_dto.ReceiveDto">
|
|
|
|
|
|
|
|
<result column="total_score" jdbcType="DECIMAL" property="totalScore"/>
|
|
|
|
|
|
|
|
<result column="stuScore" jdbcType="DECIMAL" property="stuScore"/>
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getLastExamScore" parameterType="java.lang.String" resultMap="ReceiveDto">
|
|
|
|
|
|
|
|
select sse.total_score, sum(tam.case_score + tam.single_score + tam.many_score + tam.judge_score) AS stuScore
|
|
|
|
|
|
|
|
FROM tea_exam_manage tam
|
|
|
|
|
|
|
|
JOIN stu_student_exam sse ON tam.exam_manage_id = sse.exam_manage_id
|
|
|
|
|
|
|
|
WHERE userid = #{userId}
|
|
|
|
|
|
|
|
and tam.end_time < NOW()
|
|
|
|
|
|
|
|
GROUP BY sse.total_score, sse.userid
|
|
|
|
|
|
|
|
ORDER BY MAX(tam.end_time) limit 1
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|