标签:art log 遇到 order esc null 解决 int tin
1.数据库中type类型为tinyint,默认为0。在数据库中查询条件为type=0时能够正确查询,但是集成到Mybatis中却将所有的数据显示出来了
解决:Mybatis中的if条件去掉type!=‘‘,原来是 type != null and type!=‘‘
select id, type, createtime, content,title from tb_blog_info <where> <if test="type != null"> type=#{type,jdbcType=TINYINT} </if> </where> ORDER BY createtime DESC limit #{start},#{stop}
标签:art log 遇到 order esc null 解决 int tin
原文地址:http://www.cnblogs.com/liter7/p/7750366.html