From 20be5c3182e6bd46619447d6018ffe447067b525 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Jan 2020 23:50:50 +0800 Subject: [PATCH] update --- app/Http/Controllers/OrderController.php | 2 +- update.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 705460df..f2f9cf99 100755 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -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 ])) { diff --git a/update.sql b/update.sql index f906c38c..95fc38bc 100644 --- a/update.sql +++ b/update.sql @@ -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,