yesn 发表于 2016-10-19 09:30:21

刚开始玩mysql if条件等于具体值 的判断

  mysql等于具体某值的判断时,要加上.toString()函数

<if test="dataSort !=null and dataSort !='' and dataSort =='1'.toString()">
order byprice asc
</if>
<if test="dataSort == null or dataSort =='0'.toString()">
order byaddtime desc
</if>

  
页: [1]
查看完整版本: 刚开始玩mysql if条件等于具体值 的判断