mybaits字符串分割数组迭代遍历

SELECT *  from XXX
 where 1=1
 <if test="list!= null and list != ''">
   and `status` in
     <foreach collection="list.split(',')" item="item"
              index="index" open="(" close=")" separator=",">
       #{item}
     </foreach>
 </if>

猜你喜欢

转载自blog.csdn.net/weixin_39195030/article/details/87856106