mybatis判断list不为空/大小

	<if test="status != null and status.size()>0" >
      and s.orderstatus in 
      <foreach collection="status" item="listItem" open="(" close=")" separator="," >
        #{listItem}
      </foreach>
    </if>   

建议对特殊字符进行处理

	<if test="status != null and status.size() &gt; 0" >
      and s.orderstatus in 
      <foreach collection="status" item="listItem" open="(" close=")" separator="," >
        #{listItem}
      </foreach>
    </if>   
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页