|
@@ -12,7 +12,7 @@
|
|
|
<result column="teacher_id_" property="teacherId" />
|
|
|
<result column="student_id_" property="studentId" />
|
|
|
<result column="evaluation_content_" property="evaluationContent" />
|
|
|
- <result column="evaluation_result_" property="evaluationResult" />
|
|
|
+ <result column="evaluation_result_" property="evaluationResult" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler"/>
|
|
|
<result column="create_time_" property="createTime" />
|
|
|
<result column="update_time_" property="updateTime" />
|
|
|
<result column="tenant_id_" property="tenantId" />
|
|
@@ -34,33 +34,32 @@
|
|
|
INSERT INTO exam_review (id_,examination_basic_id_,teacher_id_,student_id_,evaluation_content_,
|
|
|
evaluation_result_,create_time_,update_time_,tenant_id_)
|
|
|
VALUES(#{id},#{examinationBasicId},#{teacherId},#{studentId},#{evaluationContent},
|
|
|
- #{evaluationResult},NOW(),NOW(),#{tenantId})
|
|
|
+ #{evaluationResult,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},NOW(),NOW(),#{tenantId})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<update id="update" parameterType="com.keao.edu.user.entity.ExamReview">
|
|
|
- UPDATE exam_review <set>
|
|
|
- <if test="examinationBasicId != null">
|
|
|
- examination_basic_id_ = #{examinationBasicId},
|
|
|
- </if>
|
|
|
- <if test="teacherId != null">
|
|
|
- teacher_id_ = #{teacherId},
|
|
|
- </if>
|
|
|
- <if test="evaluationResult != null">
|
|
|
- evaluation_result_ = #{evaluationResult},
|
|
|
- </if>
|
|
|
- <if test="tenantId != null">
|
|
|
- tenant_id_ = #{tenantId},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">
|
|
|
- update_time_ = #{updateTime},
|
|
|
- </if>
|
|
|
- <if test="studentId != null">
|
|
|
- student_id_ = #{studentId},
|
|
|
- </if>
|
|
|
- <if test="evaluationContent != null">
|
|
|
- evaluation_content_ = #{evaluationContent},
|
|
|
- </if>
|
|
|
+ UPDATE exam_review
|
|
|
+ <set>
|
|
|
+ <if test="examinationBasicId != null">
|
|
|
+ examination_basic_id_ = #{examinationBasicId},
|
|
|
+ </if>
|
|
|
+ <if test="teacherId != null">
|
|
|
+ teacher_id_ = #{teacherId},
|
|
|
+ </if>
|
|
|
+ <if test="evaluationResult != null">
|
|
|
+ evaluation_result_ = #{evaluationResult,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ tenant_id_ = #{tenantId},
|
|
|
+ </if>
|
|
|
+ <if test="studentId != null">
|
|
|
+ student_id_ = #{studentId},
|
|
|
+ </if>
|
|
|
+ <if test="evaluationContent != null">
|
|
|
+ evaluation_content_ = #{evaluationContent},
|
|
|
+ </if>
|
|
|
+ update_time_ = NOW()
|
|
|
</set> WHERE id_ = #{id}
|
|
|
</update>
|
|
|
|