<iftest="projectId !=null and projectId !=''"> and exists ( select 1 from xm.xm_test_case_exec c where c.case_id=res.id and c.project_id=#{projectId} )</if>
<iftest="productId != null and productId !='' "> and exists( select 1 from xm.xm_menu m where m.menu_id =res.menu_id and m.product_id=#{productId}) </if>
<iftest="key != null and key !='' "> and res.case_name like #{key} </if>