下單的時候報錯,空指針和SQL語法錯誤等,后來發現SQL語句寫錯好幾處,多了” ,; ( “ 少了” = “ 時有發生
排查錯誤時發現不能把參數返回給rows
控制台報錯SQL語法
org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 5 ###
查看VideoOrderMapper.xml果然語法還有錯誤,去掉逗號和分號
更改SQL語句后rows已經有值了
下單成功
查看數據庫,用戶下單成功