关于mapper.xml中做类似if else的判断

mapper.xml中是只有if标签而没有else这个标签,不过他可以用其他标签进行代替,如下:

1 <choose>
2     <when test="realpay_time != null and realpay_time !=''">
3         AND r.dif_minute &gt;90
4     </when>    
5     <otherwise>
6         AND r.dif_minute2 &gt;90
7     </otherwise>    
8 </choose>

 

posted @ 2018-02-22 09:33  syl知天下  阅读(1013)  评论(0编辑  收藏  举报