The query result does not exist in mybatis, but it can be queried directly in sql.

< select id= "selectSpAmtBetweenDate" resultMap= "SumAmtResultMap" >

select
<include refid="Base_Column_List" />,
SUM(sp_amt) as sp_sum_amt
from shelf_pay sp
where  sp.sp_shelf_no = -sharp{shelfNo}  and sp.sp_time >=-sharp{startDate}
  and sp.sp_time < -sharp{endDate}
group by sp.sp_shelf_no

< / select >

< select id= "selectAllSpAmtFromStartDate" resultMap= "SumAmtResultMap" >

select
<include refid="Base_Column_List" />,
SUM(sp_amt) as sp_sum_amt
from shelf_pay sp
left join billinfo bi on sp.sp_shelf_no = bi.device_id
left join user_shelf us  on us.shelf_id = sp.sp_shelf_no
where  bi.bill_status= -sharp{status}  and sp.sp_time >=bi.bill_startDate
AND us.user_id = -sharp{userId}
group by sp.sp_shelf_no

< / select >
the upper one of these two select can be returned normally, but the lower one has not been queried. But it can be queried in the database tool. There are two more connections in the last one.
never found the cause of the problem. I also hope to give you some advice.

Mar.22,2021

you can print the executed sql on the console and take a look at

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e527f2-657d2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e527f2-657d2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?