微信開發者工具從後臺獲取值得時候出現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.則微信開發者工具纔不會報錯。

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