From 7cbeceb860cf8840bcf7dd9376ecb0a10eb5c073 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Tue, 26 Sep 2023 16:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BF=9D=E8=AF=81=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/merchant/Merchant.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index 4040929a..4502a1d2 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -268,12 +268,15 @@ class Merchant extends BaseController if(empty($merchantInfo)){ return app('json')->fail('参数错误'); } + $merchantInfo['unpaid_margin'] = $merchantInfo['margin']; $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['unpaid_margin'] = $merchantInfo['margin']; } else { $merchantInfo['margin'] = $merchantTypeInfo['first_margin']; + $merchantInfo['unpaid_margin'] = $merchantTypeInfo['margin']; } } return app('json')->success($merchantInfo);