mybatis if test 解决页面 升序和降序的问题

<if test="status !=null and status !='' and status =='1'.toString()">
ORDER BY tag.create_time DESC
</if>
<if test="status !=null and status !='' and status =='2'.toString()">
ORDER BY tag.create_time ASC
</if>
原文地址:https://www.cnblogs.com/dzcWeb/p/7070589.html