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