|
@@ -17,6 +17,8 @@
|
|
|
<result column="enroll_end_time_" property="enrollEndTime" />
|
|
|
<result column="expect_exam_start_time_" property="expectExamStartTime" />
|
|
|
<result column="expect_exam_end_time_" property="expectExamEndTime" />
|
|
|
+ <result column="actual_exam_start_time_" property="actualExamStartTime" />
|
|
|
+ <result column="actual_exam_end_time_" property="actualExamEndTime" />
|
|
|
<result column="poster_title_" property="posterTitle" />
|
|
|
<result column="poster_profile_" property="posterProfile" />
|
|
|
<result column="poster_background_img_" property="posterBackgroundImg" />
|
|
@@ -47,8 +49,13 @@
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.keao.edu.user.entity.ExaminationBasic" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO examination_basic (id_,name_,exam_mode_,exam_location_id_list_,exam_location_name_list_,status_,enroll_start_time_,enroll_end_time_,expect_exam_start_time_,expect_exam_end_time_,poster_title_,poster_profile_,poster_background_img_,creator_id_,create_time_,update_time_,tenant_id_,memo_,organ_id_)
|
|
|
- VALUES(#{id},#{name},#{examMode,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{examLocationIdList},#{examLocationNameList},#{status,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{enrollStartTime},#{enrollEndTime},#{expectExamStartTime},#{expectExamEndTime},#{posterTitle},#{posterProfile},#{posterBackgroundImg},#{creatorId},NOW(),NOW(),#{tenantId},#{memo},#{organId})
|
|
|
+ INSERT INTO examination_basic (id_,name_,exam_mode_,exam_location_id_list_,exam_location_name_list_,status_,enroll_start_time_,enroll_end_time_,
|
|
|
+ expect_exam_start_time_,expect_exam_end_time_,actual_exam_start_time_,actual_exam_end_time_,
|
|
|
+ poster_title_,poster_profile_,poster_background_img_,creator_id_,create_time_,update_time_,tenant_id_,memo_,organ_id_)
|
|
|
+ VALUES(#{id},#{name},#{examMode,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{examLocationIdList},#{examLocationNameList},
|
|
|
+ #{status,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{enrollStartTime},#{enrollEndTime},
|
|
|
+ #{expectExamStartTime},#{expectExamEndTime},#{actualExamStartTime},#{actualExamEndTime},
|
|
|
+ #{posterTitle},#{posterProfile},#{posterBackgroundImg},#{creatorId},NOW(),NOW(),#{tenantId},#{memo},#{organId})
|
|
|
</insert>
|
|
|
|
|
|
<update id="update" parameterType="com.keao.edu.user.entity.ExamOrganizationRelation">
|
|
@@ -81,6 +88,12 @@
|
|
|
<if test="expectExamEndTime != null">
|
|
|
expect_exam_end_time_ = #{expectExamEndTime},
|
|
|
</if>
|
|
|
+ <if test="actualExamStartTime != null">
|
|
|
+ actual_exam_start_time_ = #{actualExamStartTime},
|
|
|
+ </if>
|
|
|
+ <if test="actualExamEndTime != null">
|
|
|
+ actual_exam_end_time_ = #{actualExamEndTime},
|
|
|
+ </if>
|
|
|
<if test="posterTitle != null">
|
|
|
poster_title_ = #{posterTitle},
|
|
|
</if>
|
|
@@ -107,50 +120,56 @@
|
|
|
<foreach collection="exams" item="exam" separator=";">
|
|
|
UPDATE examination_basic
|
|
|
<set>
|
|
|
- <if test="name != null">
|
|
|
+ <if test="exam.name != null">
|
|
|
name_ = #{exam.name},
|
|
|
</if>
|
|
|
- <if test="examMode != null">
|
|
|
+ <if test="exam.examMode != null">
|
|
|
exam_mode_ = #{exam.examMode,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
|
|
|
</if>
|
|
|
- <if test="examLocationIdList != null">
|
|
|
+ <if test="exam.examLocationIdList != null">
|
|
|
exam_location_id_list_ = #{exam.examLocationIdList},
|
|
|
</if>
|
|
|
- <if test="examLocationNameList != null">
|
|
|
+ <if test="exam.examLocationNameList != null">
|
|
|
exam_location_name_list_ = #{exam.examLocationNameList},
|
|
|
</if>
|
|
|
- <if test="status != null">
|
|
|
+ <if test="exam.status != null">
|
|
|
status_ = #{exam.status,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
|
|
|
</if>
|
|
|
- <if test="enrollStartTime != null">
|
|
|
+ <if test="exam.enrollStartTime != null">
|
|
|
enroll_start_time_ = #{exam.enrollStartTime},
|
|
|
</if>
|
|
|
- <if test="enrollEndTime != null">
|
|
|
+ <if test="exam.enrollEndTime != null">
|
|
|
enroll_end_time_ = #{exam.enrollEndTime},
|
|
|
</if>
|
|
|
- <if test="expectExamStartTime != null">
|
|
|
+ <if test="exam.expectExamStartTime != null">
|
|
|
expect_exam_start_time_ = #{exam.expectExamStartTime},
|
|
|
</if>
|
|
|
- <if test="expectExamEndTime != null">
|
|
|
+ <if test="exam.expectExamEndTime != null">
|
|
|
expect_exam_end_time_ = #{exam.expectExamEndTime},
|
|
|
</if>
|
|
|
- <if test="posterTitle != null">
|
|
|
+ <if test="exam.actualExamStartTime != null">
|
|
|
+ actual_exam_start_time_ = #{exam.actualExamStartTime},
|
|
|
+ </if>
|
|
|
+ <if test="exam.actualExamEndTime != null">
|
|
|
+ actual_exam_end_time_ = #{exam.actualExamEndTime},
|
|
|
+ </if>
|
|
|
+ <if test="exam.posterTitle != null">
|
|
|
poster_title_ = #{exam.posterTitle},
|
|
|
</if>
|
|
|
- <if test="posterProfile != null">
|
|
|
+ <if test="exam.posterProfile != null">
|
|
|
poster_profile_ = #{exam.posterProfile},
|
|
|
</if>
|
|
|
- <if test="posterBackgroundImg != null">
|
|
|
+ <if test="exam.posterBackgroundImg != null">
|
|
|
poster_profile_ = #{exam.posterBackgroundImg},
|
|
|
</if>
|
|
|
- <if test="tenantId != null">
|
|
|
+ <if test="exam.tenantId != null">
|
|
|
tenant_id_ = #{exam.tenantId},
|
|
|
</if>
|
|
|
- <if test="memo!=null">
|
|
|
- memo_=#{memo},
|
|
|
+ <if test="exam.memo!=null">
|
|
|
+ memo_=#{exam.memo},
|
|
|
</if>
|
|
|
- <if test="creatorId!=null">
|
|
|
- creator_id_=#{creatorId},
|
|
|
+ <if test="exam.creatorId!=null">
|
|
|
+ creator_id_=#{exam.creatorId},
|
|
|
</if>
|
|
|
update_time_ = NOW()
|
|
|
</set> WHERE id_ = #{exam.id}
|
|
@@ -164,7 +183,12 @@
|
|
|
|
|
|
<sql id="queryCondition">
|
|
|
<where>
|
|
|
- tenant_id_=#{tenantId}
|
|
|
+ <if test="organIds!=null">
|
|
|
+ AND organ_id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" separator="," open="(" close=")">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
<if test="examStatus!=null">
|
|
|
AND status_=#{examStatus}
|
|
|
</if>
|