mybatis 中if标签判断boolean类型的写法
作者:互联网
例子方法:
在入参flag不为空的情况下直接判断:
1 <if test="flag"> 2 AND order_status IN(1, 2, 3) 3 </if> 4 5 <if test="!flag"> 6 AND order_status IN(4, 5, 6) 7 </if> 8 9 <<choose> 10 <when test="!flag"> 11 AND order_status IN (4, 5, 6) 12 </when> 13 <otherwise> 14 AND order_status IN (1, 2, 3) 15 </otherwise> 16 </choose>
标签:status,10,13,直接判断,14,boolean,mybatis,写法,order 来源: https://www.cnblogs.com/xuzhw/p/13542759.html