INSERT INTO teacher (id_,organ_id_,job_type_,job_nature_,is_probation_period_,education_background_,graduate_school_,technical_titles_,work_unit_,subject_id_,entry_date_,demission_date_,certificate_type_,certificate_num_,flow_organ_range_,introduction_,update_time_,create_time_,is_support_course_schedule_rewards_rules_) VALUES(#{id},#{organId},#{jobType},#{jobNature},#{isProbationPeriod,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{educationBackground},#{graduateSchool},#{technicalTitles},#{workUnit},#{subjectId},#{entryDate},#{demissionDate},#{certificateType},#{certificateNum},#{flowOrganRange},#{introduction},now(),now(),#{isSupportCourseScheduleRewardsRules}) INSERT INTO sys_user (im_token_,id_,username_,salt_,phone_,avatar_,organ_id_,create_time_,update_time_,wx_openid_,qq_openid_,user_type_,gender_,nation_,birthdate_,email_,id_card_no_,wechat_id_,real_name_,password_) VALUES(#{imToken},#{id},#{username},#{salt},#{phone},#{avatar},#{organId},now(),now(),#{wxOpenid},#{qqOpenid},#{userType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{gender},#{nation},#{birthdate},#{email},#{idCardNo},#{wechatId},#{realName},#{password}) UPDATE teacher graduate_school_ = #{graduateSchool}, subject_id_ = #{subjectId}, organ_id_ = #{organId}, technical_titles_ = #{technicalTitles}, entry_date_ = #{entryDate}, demission_date_ = #{demissionDate}, job_type_ = #{jobType}, flow_organ_range_ = #{flowOrganRange}, certificate_type_ = #{certificateType}, job_nature_ = #{jobNature}, is_probation_period_ = #{isProbationPeriod,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, update_time_ = NOW(), education_background_ = #{educationBackground}, certificate_num_ = #{certificateNum}, work_unit_ = #{workUnit}, introduction_ = #{introduction}, is_support_course_schedule_rewards_rules_ = #{isSupportCourseScheduleRewardsRules}, WHERE id_ = #{id} DELETE FROM teacher WHERE id_ = #{id} UPDATE sys_user del_flag_ = #{delFlag, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, wx_openid_ = #{wxOpenid}, avatar_ = #{avatar}, email_ = #{email}, gender_ = #{gender}, salt_ = #{salt}, username_ = #{username}, user_type_ = #{userType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, update_time_ = NOW(), lock_flag_ = #{lockFlag, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, birthdate_ = #{birthdate}, phone_ = #{phone}, qq_openid_ = #{qqOpenid}, nation_ = #{nation}, organ_id_ = #{organId}, im_token_ = #{imToken}, WHERE id_ = #{id} AND su.lock_flag_ = #{lockFlag} AND FIND_IN_SET(#{subjectId},t.subject_id_) AND FIND_IN_SET(su.organ_id_,#{organId}) AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%')) AND t.job_nature_ = #{jobNature} AND t.is_probation_period_ = #{isProbationPeriod} AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%') OR su.id_=#{search}) AND cgtm.music_group_id_ = #{musicGroupId} AND cg.id_ = #{classGroupId} CONCAT(cs.class_date_,' ',cs.start_class_time_) < NOW() AND cgtm.teacher_role_ = 'BISHOP' AND cs.class_date_ >= #{startTime} AND cs.class_date_ <= #{endTime} AND ta.music_group_id_ = #{musicGroupId} AND su.real_name_ LIKE CONCAT('%',#{teacherName},'%') sr.music_group_id_ = #{musicGroupId} AND (spo.type_ = 'APPLY' OR spo.type_ IS NULL) AND sr.music_group_status_ != 'QUIT' AND sr.actual_subject_id_ = #{subjectId} CONCAT(cs.class_date_,' ',cs.start_class_time_) < NOW() AND cs.actual_teacher_id_ = #{teacherId} AND cs.class_date_ >= #{courseStartDate} AND cs.class_date_ <= #{courseEndDate} AND cs.type_ = #{courseScheduleType} AND csts.teacher_role_ = #{teacherRole} AND ta.sign_in_status_ = #{signInStatus} AND ta.sign_out_status_ = #{signOutStatus}