From 3319fc01a428ac9ca30a8d7693ccdac00f8fdfde Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Tue, 26 Sep 2023 17:45:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=94=AF=E4=BB=98=E4=BF=9D?= =?UTF-8?q?=E8=AF=81=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 4 +--- app/controller/api/store/merchant/Merchant.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index d5cd50c0..bd0a4424 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -282,9 +282,7 @@ class Auth extends BaseController } $merchantTypeInfo = Db::name('merchant_type')->where('mer_type_id', $merchant['type_id'])->find(); if ($merchantTypeInfo['first_margin'] > 0) { - if ($merchant['first_margin_status']) { - $merchant['margin'] = bcsub($merchant['margin'], $merchantTypeInfo['first_margin'], 2); - } else { + if (!$merchant['first_margin_status']) { $merchant['margin'] = $merchantTypeInfo['first_margin']; } } diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index 4502a1d2..44af882f 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -272,7 +272,7 @@ class Merchant extends BaseController $merchantTypeInfo = Db::name('merchant_type')->where('mer_type_id', $merchantInfo['type_id'])->find(); if ($merchantTypeInfo['first_margin'] > 0) { if ($merchantInfo['first_margin_status']) { - $merchantInfo['margin'] = bcsub($merchantInfo['margin'], $merchantTypeInfo['first_margin'], 2); + $merchantInfo['margin'] = $merchantInfo['margin']; $merchantInfo['unpaid_margin'] = $merchantInfo['margin']; } else { $merchantInfo['margin'] = $merchantTypeInfo['first_margin'];