原文:Mapper method 'com.autoyol.mapper.trans.AccountLogMapper.getTotalIncomByMemNoLastest attempted to return null from a method with a primitive return type (int).解决方法

.打开日志输出,降低日志级别。 .调整mysql语句,不能使用order by limit之类的 ...

2016-05-06 18:15 1 5211 推荐指数:

查看详情

attempted to return null from a method with a primitive return type (int)

解决方法方法1:将boolean、int、long等基本数据类型改为封装数据类型,boolean封装数据类型为Boolean、int封装数据类型为Integer,根据个人项目逻辑,对返回值进行判断即可。方法2:使用MySQL种的IFNULL函数,IFNULL函数是MySQL控制流函数 ...

Tue Feb 25 23:36:00 CST 2020 0 2918
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM