mybatis:字符串相等的比较
必须得用toString()进行转换,否则比较不成功。
<sql id="where_kflb"> <choose> <when test="kskm == '2'.toString()"> select kflbid from t_kflb where kfkm='2' and kflbid not in ('10100','10200','20000') </when> <otherwise> select kflbid from t_kflb where kfkm='3' and kflbid not in ('30100','30200','40000') </otherwise> </choose> </sql>
本文来自博客园,作者:huiy_小溪,转载请注明原文链接:https://www.cnblogs.com/huiy/p/16502179.html