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_,organ_id_) VALUES(#{userId},#{jobNature},#{educationBackground},#{graduateSchool},#{technicalTitles},#{entryDate},#{certificateType}, #{certificateNum},NOW(),NOW(),#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{tenantId},#{organId}) UPDATE employee graduate_school_ = #{graduateSchool}, introduction_ = #{introduction}, postal_code_ = #{postalCode}, technical_titles_ = #{technicalTitles}, entry_date_ = #{entryDate}, contact_address_ = #{contactAddress}, job_nature_ = #{jobNature}, user_id_ = #{userId}, certificate_type_ = #{certificateType}, education_background_ = #{educationBackground}, certificate_num_ = #{certificateNum}, demission_date_ = #{demissionDate}, tenant_id_=#{tenantId}, organ_id_=#{organId}, update_time_ = NOW() WHERE user_id_ = #{userId} UPDATE employee SET del_flag_ = 1,update_time_ = NOW() WHERE user_id_ = #{userId} e.del_flag_ = 0 AND e.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}