From be44c7e9e0a4124d02e13b0d89040970f39aa1ff Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Sat, 23 Sep 2023 14:57:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BF=9D=E8=AF=81=E9=87=91?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index e6cecfa7..90911378 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -281,6 +281,15 @@ class Auth extends BaseController return app('json')->fail('用户店铺异常'); } $repository = app()->make(StoreOrderRepository::class); + $orderSn = "bzj" . date('YmdHis') . uniqid(); + Db::name('margin_order')->insert([ + 'uid' => $user['uid'], + 'mer_id' => $merchant['mer_id'], + 'order_sn' => $orderSn, + 'total_price' => $merchant['margin'], + 'pay_type' => 1, + 'create_time' => date('Y-m-d H:i:s') + ]); $param = [ "status" => 0, "is_del" => 0, @@ -289,7 +298,7 @@ class Auth extends BaseController "attach" => "margin", "order_info" => '{"is_margin":1,"margin":"' . $merchant['margin'] . '"}', "pay_price" => $merchant['margin'], - "order_sn" => "bzj" . date('YmdHis') . uniqid(), + "order_sn" => $orderSn, "body" => $merchant['mer_name'] . ' - ' . $merchant['margin'], ]; $payType = 'weixinApp';