INSERT INTO cooperation_organ
(id_, name_, linkman_, job_, mobile_no_, address_, organ_id_, create_time_, update_time_, ownership_type_,
is_enable_, full_job_resource_,education_user_id_,tenant_id_)
VALUES (#{id}, #{name}, #{linkman}, #{job}, #{mobileNo}, #{address}, #{organId}, now(), now(),
#{ownershipType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{isEnable},
#{fullJobResource},#{educationUserId},#{tenantId})
UPDATE cooperation_organ
education_user_id_ = #{educationUserId},
full_job_resource_ = #{fullJobResource},
address_ = #{address},
job_ = #{job},
linkman_ = #{linkman},
update_time_ = NOW(),
mobile_no_ = #{mobileNo},
name_ = #{name},
ownership_type_ = #{ownershipType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
organ_id_ = #{organId},
is_enable_ = #{isEnable},
WHERE id_ = #{id} and tenant_id_ = #{tenantId}
UPDATE cooperation_organ
SET del_flag_ = 1
WHERE id_ = #{id}
UPDATE cooperation_organ SET education_user_id_ = #{transferUserId} WHERE organ_id_ = #{organId} AND education_user_id_ = #{levelUserId}
co.del_flag_ != 1
AND (co.education_user_id_ = #{search} OR su.real_name_ LIKE CONCAT('%',#{search},'%')
OR co.id_ LIKE CONCAT('%',#{search},'%') OR co.name_ LIKE CONCAT('%',#{search},'%'))
AND FIND_IN_SET(co.organ_id_,#{organId})
AND co.is_enable_ = #{isEnable}
AND co.tenant_id_ = #{tenantId}
AND co.full_job_resource_ = #{fullJobResource}