Mybatis之foreach标签使用方法

2022-07-26  本文已影响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>
上一篇 下一篇

猜你喜欢

热点阅读