mybatis if test 使用遇到问题了,望大神指点
柔情小汪汪 2017-03-14 11:24:33 <!-- 实际上报次数 -->
<select id="searchPatientInfo_6" resultType="java.lang.Integer" parameterType="com.ustcsoft.qc.web.checkItemScore.action.form.ReportMsgTabReqForm">
select count(*)
from(
select *
from ${tabNameDB}
where make_date >=#{beginDate} and make_date <#{date6_1} and del_flag='0'
group by pnt_id
<if test="#{date6_2l}<=#{endDatel}">
union all
select *
from ${tabNameDB}
where make_date >=#{date6_1} and make_date <#{date6_2} and del_flag='0'
group by pnt_id
</if>
<if test="#{date6_3l}<=#{endDatel}">
union all
select *
from ${tabNameDB}
where make_date >=#{date6_2} and make_date <#{date6_3} and del_flag='0'
group by pnt_id
</if>
<if test="#{date6_4l}<=#{endDatel}">
union all
select *
from ${tabNameDB}
where make_date >=#{date6_3} and make_date <#{date6_4} and del_flag='0'
group by pnt_id
</if>
<if test="#{date6_5l}<=#{endDatel}">
union all
select *
from ${tabNameDB}
where make_date >=#{date6_4} and make_date <#{date6_5} and del_flag='0'
group by pnt_id
</if>
<if test="#{date6_6l}<=#{endDatel}">
union all
select *
from ${tabNameDB}
where make_date >=#{date6_5} and make_date <#{date6_6} and del_flag='0'
group by pnt_id
</if>
) a
</select>
报错是:### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.LinkedHashMap and java.util.LinkedHashMap
### Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.LinkedHashMap and java.util.LinkedHashMap
[DEBUG] 11:02:49.596 [http-nio-8080-exec-2] ResponseStatusExceptionResolver - Resolving exception from handler [public com.ustcsoft.apollofw.web.response.bean.JsonDataList<com.ustcsoft.qc.web.checkItemScore.action.form.ReportMsgTabResForm> com.ustcsoft.qc.web.checkItemScore.action.ReportMsgTabAction.getData()]: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.LinkedHashMap and java.util.LinkedHashMap
### Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.LinkedHashMap and java.util.LinkedHashMap
[DEBUG] 11:02:49.596 [http-nio-8080-exec-2] DefaultHandlerExceptionResolver - Resolving exception from handler [public com.ustcsoft.apollofw.web.response.bean.JsonDataList<com.ustcsoft.qc.web.checkItemScore.action.form.ReportMsgTabResForm> com.ustcsoft.qc.web.checkItemScore.action.ReportMsgTabAction.getData()]: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.LinkedHashMap and java.util.LinkedHashMap
### Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.LinkedHashMap and java.util.LinkedHashMap
[WARN ] 11:02:49.597 [http-nio-8080-exec-2] ExceptionResolverComposite - Ajax请求异常:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.LinkedHashMap and java.util.LinkedHashMap
### Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.LinkedHashMap and java.util.LinkedHashMap