and (dept_code like concat('%', #{query.deptCodeOrName},'%') or dept_name like concat('%', #{query.deptCodeOrName},'%')) and dept_status=#{query.deptStatus} delete from t_base_department where id in #{item} UPDATE t_base_department p SET has_manager=EXISTS(SELECT * FROM v_all_user WHERE department_id = p.id) WHERE id = #{departmentId}