INSERT INTO employee (user_id_,job_nature_,education_background_,graduate_school_,technical_titles_,entry_date_, certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_,contact_address_,postal_code_,tenant_id_) VALUES(#{userId},#{jobNature},#{educationBackground},#{graduateSchool},#{technicalTitles},#{entryDate},#{certificateType}, #{certificateNum},#{updateTime},#{createTime},#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{tenantId}) UPDATE employee graduate_school_ = #{graduateSchool}, introduction_ = #{introduction}, postal_code_ = #{postalCode}, technical_titles_ = #{technicalTitles}, entry_date_ = #{entryDate}, contact_address_ = #{contactAddress}, job_nature_ = #{jobNature}, create_time_ = #{createTime}, user_id_ = #{userId}, certificate_type_ = #{certificateType}, update_time_ = #{updateTime}, education_background_ = #{educationBackground}, certificate_num_ = #{certificateNum}, demission_date_ = #{demissionDate}, tenant_id_=#{tenantId} WHERE user_id_ = #{userId} UPDATE employee SET del_flag_ = 0,update_time_ = NOW() WHERE user_id_ = #{userId} e.del_flag_ = 1 AND tenant_id_ = #{tenantId} AND (e.user_id_ = #{search} OR su.phone_ LIKE CONCAT('%',#{search},'%') OR su.real_name_ LIKE CONCAT('%',#{search},'%')) AND sur.role_id_ = #{roleId}