其他分享
首页 > 其他分享> > mybatis的ifelse

mybatis的ifelse

作者:互联网

if else判断格式

<choose>
  <when test="">
    //...
  </when>
  <otherwise>
    //...
  </otherwise>
</choose>

<choose>
            <when test="orderType=1">
                order by aci.register_time desc
            </when>
            <when test="orderType=2">
                order by aci.register_time asc
            </when>
            <when test="orderType=3">
                order by aci.register_capital_qxx desc
            </when>
            <when test="orderType=3">
                order by aci.register_capital_qxx asc
            </when>
            <otherwise>
                order by aci.id desc
            </otherwise>
        </choose>

 

标签:...,aci,register,ifelse,capital,mybatis,order,desc
来源: https://www.cnblogs.com/devin-sl/p/12706394.html