MyBatis数组与集合判断空
数组判断空参数为数组object[]。在MyBatis判断空时,先判断是否为null,不为null则判断数组长度object.length是否大于0即可。<if test="object!=null and object.length>0"><yourSql></if>集合判断空参数为集合List。在MyBatis判断空时,先判断是...
   ·  
 数组判断空
  参数为数组object[]。在MyBatis判断空时,先判断是否为null,不为null则判断数组长度object.length是否大于0即可。
	<if test="object!=null and object.length>0">
		<yourSql>
	</if>
集合判断空
  参数为集合List。在MyBatis判断空时,先判断是否为null,不为null则判断集合长度object.size()是否大于0即可。
<if test="object!=null and object.size()>0">
		<yourSql>
	</if>
更多推荐
 


所有评论(0)