select ifnull(${label}, '未选择') as label, count(${count}) as `count`, ifnull(${value}, 'null') as `value`, group_concat(distinct a.id) as ids from os_patent a left join os_portfolio_link b on b.pid = a.id left join os_thematic_pid b on b.pid = a.id and b.zid = #{params.projectId} and b.fid = #{params.folder} and ${label} like concat('%', #{params.label}, '%') and b.pid in #{item} group by ${groupBy} order by `${orderBy}` desc, `value` asc