这是我的mybatis查询
<select id="selectTotalStateList" resultMap="BaseResultMap" >
select
A.LOFFICE_NO
,(select SOFFICE_NAME from OFFICE where LOFFICE_NO = a.LOFFICE_NO) as OFFICE_NAME
,nvl(count(DECODE(A.TOTAL_TYPE,'00',1)),0) as AUTO0
,nvl(count(DECODE(A.TOTAL_TYPE,'01',1)),0) as AUTO1
,nvl(count(DECODE(A.TOTAL_TYPE,'02',1)),0) as AUTO2
,nvl(count(DECODE(A.TOTAL_TYPE,'03',1)),0) as AUTO3
,nvl(count(DECODE(A.TOTAL_TYPE,'04',1)),0) as AUTO4
,nvl(count(DECODE(A.TOTAL_TYPE,'05',1)),0) as AUTO5
,nvl(count(DECODE(A.TOTAL_TYPE,1,1)),0) as AWS
,nvl(count(DECODE(A.TOTAL_TYPE,2,1)),0) as TEXT
from KNPSAWS.TBL_DISASTER_WARNING_CARD a
group by ROLLUP(A.LOFFICE_NO)
order by A.LOFFICE_NO
</select>
这里是app log query
select A.LOFFICE_NO ,(select SOFFICE_NAME from OFFICE where LOFFICE_NO = a.LOFFICE_NO) as OFFICE_NAME
,nvl(count(DECODE(A.TOTAL_TYPE,'00',1)),0) as HTYPE ,nvl(count(DECODE(A.TOTAL_TYPE,'01',1)),0)
as DETAILED_TYPE ,nvl(count(DECODE(A.TOTAL_TYPE,'02',1)),0) as TOTAL_TYPE ,nvl(count(DECODE(A.TOTAL_TYPE,'03',1)),0)
as AUTO3 ,nvl(count(DECODE(A.TOTAL_TYPE,'04',1)),0) as SEA_LEVEL ,nvl(count(DECODE(A.TOTAL_TYPE,'05',1)),0)
as REGION_NAME ,nvl(count(DECODE(A.TOTAL_TYPE,1,1)),0) as WIDTH ,nvl(count(DECODE(A.TOTAL_TYPE,2,1)),0)
as LENGTH from KNPSAWS.TBL_DISASTER_WARNING_CARD a group by ROLLUP(A.LOFFICE_NO) order by A.LOFFICE_NO
这些是我所期望的完全相同的查询。
它是Sql Developer上真正的返回结果
4 AA 0 0 0 0 0 0 0 1
6 DD 1 0 0 0 0 0 1 0
1 0 0 0 0 0 1 1
但是mybatis只返回第一行。
在T.T
之前,我从未经历过这样的事情那个结果图很好......因为我已经毫无问题地使用了这张地图。 我该如何解决?
答案 0 :(得分:0)
interfaceMapper.java
public List<ClassName> selectTotalStateList();