您的位置:首页 > 其它

MyBatis提示getFundBonus attempted to return null from a method with a primitive return type (double)

2017-10-13 11:19 453 查看
错误提示:

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类型的问题了。


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mybatis
相关文章推荐