欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ibatis3 参数有list ,IN  

程序员文章站 2022-07-14 18:42:31
...
<select id="findCompatibilityMTs" resultType="String" parameterType="java.util.List"> 
...  in
<foreach item="optCpId"  collection="list" open="(" separator=","    close=")" index="index" >
#{optCpId }
</foreach>
</select>

<select id="findOptionCompatibilityMTInfos" resultType="hashmap" parameterType="hashmap">
... tco.pk_id in

<foreach item="optCpId"  collection="optCpIds" open="("    separator="," close=")" index="index" >
#{optCpId }
</foreach>
</select>