|
@@ -12,6 +12,7 @@
|
|
|
<result column="student_id_" property="studentId" />
|
|
|
<result column="result_" property="result" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler" />
|
|
|
<result column="confirm_status_" property="confirmStatus" />
|
|
|
+ <result column="is_finished_exam_" property="isFinishedExam" />
|
|
|
<result column="memo_" property="memo" />
|
|
|
<result column="operator_id_" property="operatorId" />
|
|
|
<result column="create_time_" property="createTime" />
|
|
@@ -32,10 +33,19 @@
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.keao.edu.user.entity.StudentExamResult" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO student_exam_result (id_,examination_basic_id_,student_id_,result_,confirm_status_,memo_,operator_id_,create_time_,update_time_,tenant_id_)
|
|
|
- VALUES(#{id},#{examinationBasicId},#{studentId},#{result,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{confirmStatus},#{memo},#{operatorId},NOW(),NOW(),#{tenantId})
|
|
|
+ INSERT INTO student_exam_result (id_,examination_basic_id_,student_id_,result_,confirm_status_,memo_,operator_id_,is_finished_exam_,create_time_,update_time_,tenant_id_)
|
|
|
+ VALUES(#{id},#{examinationBasicId},#{studentId},#{result,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{confirmStatus},#{memo},#{operatorId},#{isFinishedExam},NOW(),NOW(),#{tenantId})
|
|
|
</insert>
|
|
|
-
|
|
|
+
|
|
|
+ <insert id="batchInsert" parameterType="com.keao.edu.user.entity.StudentExamResult" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
+ INSERT INTO student_exam_result (examination_basic_id_,student_id_,result_,confirm_status_,memo_,operator_id_,is_finished_exam_,create_time_,update_time_,tenant_id_)
|
|
|
+ VALUES
|
|
|
+ <foreach collection="results" item="result" separator=",">
|
|
|
+ (#{result.examinationBasicId},#{result.studentId},#{result.result,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
|
|
|
+ #{result.confirmStatus},#{result.memo},#{result.operatorId},#{result.isFinishedExam},NOW(),NOW(),#{result.tenantId})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<update id="update" parameterType="com.keao.edu.user.entity.StudentExamResult">
|
|
|
UPDATE student_exam_result
|
|
@@ -61,6 +71,9 @@
|
|
|
<if test="memo != null">
|
|
|
memo_ = #{memo},
|
|
|
</if>
|
|
|
+ <if test="isFinishedExam != null">
|
|
|
+ is_finished_exam_ = #{isFinishedExam},
|
|
|
+ </if>
|
|
|
update_time_ = NOW()
|
|
|
</set> WHERE id_ = #{id}
|
|
|
</update>
|