讨论数量: 9
![](https://cdn.learnku.com/uploads/avatars/25394_1537168503.jpeg!/both/100x100)
有个被忽略的小细节,直接提交订单,提示"系统错误"?
![](https://cdn.learnku.com/uploads/avatars/20049_1571133240.png!/both/100x100)
检测一张优惠券一个用户只能使用一次的逻辑有漏洞
![](https://cdn.learnku.com/uploads/avatars/21132_1547357872.jpg!/both/100x100)
请问这里订单中存储优惠券使用信息是否要用快照形式 (JSON 格式)?
![](https://cdn.learnku.com/uploads/avatars/26372_1529222026.jpeg!/both/100x100)
修正 App/Services/OrderService.php
![](https://cdn.learnku.com/uploads/avatars/55010_1576682082.jpeg!/both/100x100)
查看 Model::Query () 对应的 sql
![](https://cdn.learnku.com/uploads/avatars/33407_1544682873.jpg!/both/100x100)
检查优惠券报错,报错信息说控制器调用 checkAvailable () 传入参数太少
![](https://cdn.learnku.com/uploads/avatars/20302_1515989217.jpeg!/both/100x100)
既然关闭订单减少了优惠券用量,那么退款呢?
![](https://cdn.learnku.com/uploads/avatars/20047_1519798224.jpg!/both/100x100)
点击检查优惠券报错,上一章节是正常的。
关于优惠券拓展性的一个小想法