美文网首页
Mybatis之foreach标签使用方法

Mybatis之foreach标签使用方法

作者: 神克昆 | 来源:发表于2022-07-26 15:27 被阅读0次

MyBatis动态sql之foreach标签 Mybatis之foreach标签使用方法,Mybatis之foreach标签在xml文件中使用方法,持久层写法:


file file
 <if test="questionIds!= null and questionIds.size()>0" >
       WHERE id in
      <foreach collection="questionIds" index="index" item="item" open="(" separator="," close=")">
            #{item}
       </foreach>
 </if>

相关文章

网友评论

      本文标题:Mybatis之foreach标签使用方法

      本文链接:https://www.haomeiwen.com/subject/pjmoirtx.html