INSERT INTO examination_basic (id_,name_,exam_mode_,exam_location_id_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},#{status,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{enrollStartTime},#{enrollEndTime},#{expectExamStartTime},#{expectExamEndTime},#{posterTitle},#{posterProfile},#{posterBackgroundImg},#{creatorId},NOW(),NOW(),#{tenantId},#{memo},#{organId}) UPDATE examination_basic name_ = #{name}, exam_mode_ = #{examMode,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}, exam_location_id_list_ = #{examLocationIdList}, status_ = #{status,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}, enroll_start_time_ = #{enrollStartTime}, enroll_end_time_ = #{enrollEndTime}, expect_exam_start_time_ = #{expectExamStartTime}, expect_exam_end_time_ = #{expectExamEndTime}, poster_title_ = #{posterTitle}, poster_profile_ = #{posterProfile}, poster_profile_ = #{posterBackgroundImg}, tenant_id_ = #{tenantId}, memo_=#{memo}, creator_id_=#{creatorId}, update_time_ = NOW() WHERE id_ = #{id} UPDATE examination_basic name_ = #{exam.name}, exam_mode_ = #{exam.examMode,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}, exam_location_id_list_ = #{exam.examLocationIdList}, status_ = #{exam.status,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}, enroll_start_time_ = #{exam.enrollStartTime}, enroll_end_time_ = #{exam.enrollEndTime}, expect_exam_start_time_ = #{exam.expectExamStartTime}, expect_exam_end_time_ = #{exam.expectExamEndTime}, poster_title_ = #{exam.posterTitle}, poster_profile_ = #{exam.posterProfile}, poster_profile_ = #{exam.posterBackgroundImg}, tenant_id_ = #{exam.tenantId}, memo_=#{memo}, creator_id_=#{creatorId}, update_time_ = NOW() WHERE id_ = #{exam.id} DELETE FROM examination_basic WHERE id_ = #{id} tenant_id_=#{tenantId} AND status_=#{examStatus} AND (id_=#{search} OR name_ LIKE CONCAT(#{search}, '%'))