更新保证金
This commit is contained in:
parent
c653d80759
commit
7cbeceb860
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user