This commit is contained in:
root 2020-01-01 23:50:50 +08:00
parent 7639f07b83
commit 20be5c3182
2 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ class OrderController extends Controller
if (!CouponLog::create([
'coupon_id' => $coupon->id,
'user_id' => $order->user_id,
'order_id' => $order->id,
'order_trade_no' => $order->trade_no,
'total_amount' => $order->total_amount,
'discount_amount' => $order->discount_amount
])) {

View File

@ -106,9 +106,9 @@ CREATE TABLE `v2_coupon` (
CREATE TABLE `v2_coupon_log` (
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
`coupon_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`order_id` int(11) NOT NULL,
`coupon_id` int(11) NOT NULL,
`order_trade_no` char(32) NOT NULL,
`total_amount` int(11) NOT NULL,
`discount_amount` int(11) NOT NULL,
`created_at` int(11) NOT NULL,