关于mybatis传递string字符串判断

来源:互联网 发布:mac win10触控板手势 编辑:程序博客网 时间:2024/06/06 00:52
<if test="null != sortType and sortType != '' and sortType == 'priceUp'">
ORDER BY (SALE_PRICE * CAST(IFNULL(DISCOUNT_NUM,1) AS DECIMAL(15,2))) ASC

</if>

<if test="null != sortType and sortType != '' and sortType == 'priceDown'">
ORDER BY (SALE_PRICE * CAST(IFNULL(DISCOUNT_NUM,1) AS DECIMAL(15,2))) DESC
</if>
0 0
原创粉丝点击