微信开发者工具从后台获取值得时候出现attempted to return null from a method with a primitive return type (double).

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

从后要获取的值是一个double类型,刚开始在mapper.xml文件下的查询语句中

当查询出来的值为空,即没有值的时候,它的数据为null而不是double数据,正确的写法是

当它为空的之后,给它赋值为0.则微信开发者工具才不会报错。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章