问题:使用MyBatis的过程中,发现一个值为0的数据,Mybatis所识别,最后定位才发现,是自己的写法有问题,
<if test="form.passLine != null and form.passLine != '' ">
and is_live = #{form.passLine,jdbcType=INTEGER}
</if>
更正成:
<span style="color:#FF0000;"> <if test="form.passLine != null and form.passLine != -1 ">
and is_live = #{form.passLine,jdbcType=INTEGER}
</if></span>
完美解决。
以下是代码:
<select id="countPageByParam" resultType="java.lang.Long">
select count(id)
from lms_teacher_info
where 1=1
and city_id = #{form.cityId,jdbcType=VARCHAR}
AND update_time = #{updateTime,jd