错误提示:
Caused by: org.apache.ibatis.binding.BindingException: Mapper method 'com.amc.nonstandardinsinfo.dao.mapper.NonstandardInsInfoManageMapper.getFundBonus attempted to return null from a method with a primitive return type (double).
解决方法:
原SQL:
select SUM(t.STOCK_NUMBER) from AMC_BIZ_REC t WHERE t.UUID=123
修改后SQL:
select NVL(SUM(t.STOCK_NUMBER),0) from AMC_BIZ_REC t WHERE t.UUID=123
加上NVL后就可以解决SUM为空时,不能将NULL复制给double类型的问题了。