<select id="qryCeByIds" parameterType="string" resultType="com.ccg.erp.model.common.Files">
SELECT * FROM erp_com_files where main_id in (${ids})
</select>
<select id="qryCeByIds1" resultMap="filesMap">
SELECT
*
from erp_com_files
WHERE main_id IN
<foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</select>
传入字符串ids时要用 $ 用#只能查到一条![在这里插入图片描述](https://img-blog.csdnimg.cn/20190104185411851.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2xxejE5OTM=,size_16,color_FFFFFF,t_70)
mybatis in
最新推荐文章于 2024-07-13 14:09:52 发布