0
,這裏是我的MyBatis查詢MyBatis不會自動返回所有行,僅返回1行
<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>
,這裏是應用程序日誌查詢
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
在這之前的resultMap是好的......因爲我已經使用這個地圖沒有任何問題。 我該如何解決它?