From 174044258171fea1d33873951bee505167a38870 Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Wed, 26 Aug 2020 11:27:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=A4=E9=94=80=E7=89=B9=E4=BB=B7=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=B4=AD=E4=B9=B0=E8=AE=B0=E5=BD=95=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8global=5Forder=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/PurchaseLimitService.php | 7 ++++++- app/Service/PurchaseLimitServiceInterface.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Service/PurchaseLimitService.php b/app/Service/PurchaseLimitService.php index 41a531f..717e45e 100644 --- a/app/Service/PurchaseLimitService.php +++ b/app/Service/PurchaseLimitService.php @@ -4,6 +4,7 @@ namespace App\Service; use App\Model\Order; use App\Model\OrderGoods; +use App\Model\OrderMain; use Hyperf\Di\Annotation\Inject; use Hyperf\DbConnection\Db; use App\Model\Goods; @@ -46,8 +47,12 @@ class PurchaseLimitService implements PurchaseLimitServiceInterface return true; } - public function delSsdbPurchaseRecord($order_id) + public function delSsdbPurchaseRecord($global_order_id) { + $order_main = OrderMain::where('global_order_id',$global_order_id) + ->select('id','user_id') + ->first(); + $order_id = $order_main->id; $ssdb = ApplicationContext::getContainer()->get(SSDBTask::class); $order = Order::query() ->where('order_main_id',$order_id) diff --git a/app/Service/PurchaseLimitServiceInterface.php b/app/Service/PurchaseLimitServiceInterface.php index 5c88b2c..f5e415b 100644 --- a/app/Service/PurchaseLimitServiceInterface.php +++ b/app/Service/PurchaseLimitServiceInterface.php @@ -10,7 +10,7 @@ interface PurchaseLimitServiceInterface public function ssdbPurchaseRecord($params,$user_id,$global_order_id); - public function delSsdbPurchaseRecord($order_id); + public function delSsdbPurchaseRecord($global_order_id); public function test($params); } \ No newline at end of file