最贊回答 / ahuwhq
已解決:下單未成功斷點調試發現主要是itemId為null,注意去看
decreaseStock的SQL語句 &??supdate?id="decreaseStock"&??w ??update?item_stock ??set?stock?=?stock-#{amount} ??where?item_id?=?#{itemId}?and?stock&ck&=...
2021-05-27
最贊回答 / ahuwhq
斷點調試發現是數據庫設計問題,在userService.register(userModel);時跳出異常。解決是重新設計數據庫,刪除原來的數據庫,運行下面這段SQL:SET FOREIGN_KEY_CHECKS=0;-- ------------------------------ Table structure...
2021-05-24
最贊回答 / smallbigfans
RESTful風格的方法會返回json字符串,
Map&resString,?Object&Has?responseData?=?new?HashMap&?Co&mon();
return?CommonResultType.create(responseData,?"fail");你把map賦值存入后,它里面自動幫你把map序列化成js...
2021-05-21