限制卖单和买单金额不相等,不让汇算

huazhiyu
lqmac 1 year ago
parent 7ded155a89
commit 920c6bef24
  1. 8
      application/common/service/OrderService.php

@ -44,6 +44,14 @@ class OrderService
if (!$seller_order) { if (!$seller_order) {
return false; 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 = array_merge($buyer_order, $seller_order);
$order_new = []; $order_new = [];
foreach ($order as $value) { foreach ($order as $value) {

Loading…
Cancel
Save