excel批量导出时:
方式一
<sql id="pageWhere">
<dynamic prepend="where">
<isNotEmpty prepend="and" property="fs_id"><!--主键-->
<![CDATA[ fs_id like '%'+#fs_id#+'%' ]]>
</isNotEmpty>
<isNotEmpty prepend="and" property="conditionGroupList"><!--批量导出-->
fs_id in
<iterate property="conditionGroupList" conjunction="," open="(" close=")">
<![CDATA[ #conditionGroupList[]# ]]>
</iterate>

</isNotEmpty>

</dynamic>
</sql>
打印出的sql语句如下:
select * from where  fs_id in (xxxxxxxxxx,xxxxxxxxxxx,xxxxxxxxxxxx,xxxxxxxx)
方式二
<sql id="pageWhere">
<dynamic prepend="where">
<isNotEmpty prepend="and" property="fs_id"><!--主键-->
<![CDATA[ fs_id like '%'+#fs_id#+'%' ]]>
</isNotEmpty>
<isNotEmpty prepend="and" property="conditionGroupList"><!--批量导出-->

<iterate property="conditionGroupList" conjunction="or" open="(" close=")">
<![CDATA[ fs_id = #conditionGroupList[]# ]]>
</iterate>

</isNotEmpty>

</dynamic>
</sql>打印出的sql语句如下:select * from where ( fs_id =xxxxxxxxxx or fs_id =xxxxxxxxxx or fs_id =xxxxxxxxxx)

执行效率感兴趣的朋友测试下。