From 920c6bef2499ea92d6ab65dc8c7be12a4313bbb8 Mon Sep 17 00:00:00 2001 From: lqmac Date: Mon, 30 Oct 2023 15:36:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E5=8D=96=E5=8D=95=E5=92=8C?= =?UTF-8?q?=E4=B9=B0=E5=8D=95=E9=87=91=E9=A2=9D=E4=B8=8D=E7=9B=B8=E7=AD=89?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E8=AE=A9=E6=B1=87=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/service/OrderService.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/common/service/OrderService.php b/application/common/service/OrderService.php index 3db2daa..e9d6afe 100755 --- a/application/common/service/OrderService.php +++ b/application/common/service/OrderService.php @@ -44,6 +44,14 @@ class OrderService if (!$seller_order) { return false; } + $buyer_amount = abs(array_sum(array_column($buyer_order, "pay_amount"))); + $seller_amount = abs(array_sum(array_column($seller_order, "pay_amount"))); + // var_dump($buyer_amount); + // var_dump($seller_amount); + // exit(); + if ($buyer_amount != $seller_amount) { + return false; + } $order = array_merge($buyer_order, $seller_order); $order_new = []; foreach ($order as $value) {