更新支付保证金
This commit is contained in:
parent
a86527c82e
commit
bd894ee4c8
@ -280,6 +280,15 @@ class Auth extends BaseController
|
|||||||
if (!$merchant) {
|
if (!$merchant) {
|
||||||
return app('json')->fail('用户店铺异常');
|
return app('json')->fail('用户店铺异常');
|
||||||
}
|
}
|
||||||
|
$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 {
|
||||||
|
$merchant['margin'] = $merchantTypeInfo['first_margin'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$repository = app()->make(StoreOrderRepository::class);
|
$repository = app()->make(StoreOrderRepository::class);
|
||||||
$orderSn = "bzj" . date('YmdHis') . uniqid();
|
$orderSn = "bzj" . date('YmdHis') . uniqid();
|
||||||
Db::name('margin_order')->insert([
|
Db::name('margin_order')->insert([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user