当前位置: 代码迷 >> Java Web开发 >> 新人!百度说是关键字冲突但是不知道哪里冲突了
  详细解决方案

新人!百度说是关键字冲突但是不知道哪里冲突了

热度:65   发布时间:2016-04-16 21:38:59.0
新人求助!百度说是关键字冲突但是不知道哪里冲突了
用的MyBits测试SQL没问题,但是在页面查询stauts=2(删除状态)时候会报错 ,数据库里没有这个状态的数据,坐等大神!

<!-- 分页查询 -->
<select id="findAll" parameterType="com.lyc.entity.page.AccountPage" resultType="com.lyc.entity.Account" >
select * from account 
<where>
<if test="idcard_no!=null &amp;&amp; idcard_no.length()>0">
and idcard_no=#{idcard_no}
</if>
<if test="real_name!=null &amp;&amp; real_name.length()>0">
and real_name = #{real_name}
</if>
<if test="login_name!=null &amp;&amp; login_name.length()>0">
and login_name = #{login_name}
</if>
<if test='status!=null &amp;&amp; status.length()>0 &amp;&amp; !status.equals("-1")'>
and status = #{status}
</if>
</where>
order by account_id limit  #{begin}, #{pageSize}
</select>
------解决思路----------------------
报错信息是什么  
<if test="idcard_no!=null &amp;&amp; idcard_no.length()>0">
&amp;&amp; 这个可以写成 and
------解决思路----------------------
最好把拼接过后完整的sql语句在客户端工具里执行下,看是不是哪边写的不对或者传的值有问题
begin确认是负五?
  相关解决方案