mybatis list条件判断

<if test="userIds != null and userIds.size > 0">
    AND user_id in 
  <foreach collection="userIds" item="userId" open="(" separator="," close=")"> #{userId} foreach> if>

 

转载于:https://www.cnblogs.com/kingsonfu/p/9882139.html

你可能感兴趣的:(java)