子查询
(SELECT COUNT(DISTINCT id) FROM rec_table WHERE .. ) as idCount
报错 Error querying database. Cause: java.lang.IndexOutOfBoundsException
很多说因为Lombok的问题,我检查没有@builder的注解
最后加上ifnull 就好了
(SELECT IFNULL(COUNT(DISTINCT id) , 0)FROM rec_table WHERE .. ) as idCount