MyBatis中的mapper.xml中对于一个传递参数的多重判断
《where>
<if test="stockOrderNum!=null">
<if test='stockOrderNum=="0"'>
and mt.stock_order_id is null
</if>
<if test='stockOrderNum=="1"'>
and mt.stock_order_id is not null
and length(mt.stock_order_id)-length(replace(mt.stock_order_id,';','')) = 0
</if>
<if test='stockOrderNum=="2"'>
and mt.stock_order_id is not null
and length(mt.stock_order_id)-length(replace(mt.stock_order_id,';','')) >= 1
</if>
</if>
</where>