INSERT INTO employee (user_id_,organ_id_list_,job_nature_,is_probation_period_,education_background_,graduate_school_,technical_titles_, entry_date_,certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_,contact_address_,postal_code_,dept_id_,dept_ids_,post_ids_,post_dept_ids_) VALUES(#{userId},#{organIdList},#{jobNature},#{isProbationPeriod},#{educationBackground},#{graduateSchool}, #{technicalTitles},#{entryDate},#{certificateType},#{certificateNum},now(),now(),#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{deptId},#{deptIds},#{postIds},#{postDeptIds}) INSERT INTO sys_user_role(user_id_,role_id_) values (#{userId},#{item}) UPDATE employee contact_address_ = #{contactAddress}, postal_code_ = #{postalCode}, is_probation_period_ = #{isProbationPeriod}, graduate_school_ = #{graduateSchool}, organ_id_list_ = #{organIdList}, introduction_ = #{introduction}, technical_titles_ = #{technicalTitles}, entry_date_ = #{entryDate}, job_nature_ = #{jobNature}, certificate_type_ = #{certificateType}, update_time_ = NOW(), education_background_ = #{educationBackground}, certificate_num_ = #{certificateNum}, demission_date_ = #{demissionDate}, dept_id_ = #{deptId}, dept_ids_ = #{deptIds}, post_ids_ = #{postIds}, post_dept_ids_ = #{postDeptIds}, WHERE user_id_ = #{userId} UPDATE sys_user SET password_ = #{password} WHERE id_ = #{userID} UPDATE sys_user SET lock_flag_ = IF(lock_flag_=0,1,0) WHERE id_=#{userID} UPDATE employee SET demission_date_ = IF(demission_date_ IS NULL,now(),NULL) WHERE user_id_=#{userID} UPDATE sys_user SET lock_flag_ = #{status} WHERE id_=#{userID} UPDATE music_group SET educational_teacher_id_ = #{targetUserId} WHERE educational_teacher_id_ = #{currentUserId} AND status_ != 'CANCELED'; UPDATE vip_group SET educational_teacher_id_ = #{targetUserId} WHERE educational_teacher_id_ = #{currentUserId} AND group_status_ IN (0,1,5,2,6,4); UPDATE practice_group SET educational_teacher_id_ = #{targetUserId} WHERE educational_teacher_id_ = #{currentUserId} AND group_status_ != 'CANCEL'; DELETE FROM employee WHERE user_id_ = #{userId} DELETE FROM sys_user_role WHERE user_id_ = #{userId} UPDATE music_group SET repair_user_id_ = #{item.transferUserId} WHERE repair_user_id_ = #{item.levelUserId} AND organ_id_ = #{item.organId}; UPDATE music_group SET educational_teacher_id_ = #{item.transferUserId} WHERE educational_teacher_id_ = #{item.levelUserId} AND organ_id_ = #{item.organId}; UPDATE practice_group SET educational_teacher_id_ = #{item.transferUserId} WHERE educational_teacher_id_ = #{item.levelUserId} AND organ_id_ = #{item.organId}; UPDATE vip_group SET educational_teacher_id_ = #{item.transferUserId} WHERE educational_teacher_id_ = #{item.levelUserId} AND organ_id_ = #{item.organId}; UPDATE music_group SET team_teacher_id_ = #{item.transferUserId} WHERE team_teacher_id_ = #{item.levelUserId} AND organ_id_ = #{item.organId}; UPDATE music_group SET director_user_id_ = #{item.transferUserId} WHERE director_user_id_ = #{item.levelUserId} AND organ_id_ = #{item.organId};