修复错误

This commit is contained in:
mkm 2023-10-08 12:46:32 +08:00
parent 53c1b01fe0
commit 181e839f78

View File

@ -390,11 +390,11 @@ class Auth extends BaseController
}
if ($merchant['margin'] == 0) {
$margin = Db::name('MerchantType')->where('mer_type_id', $merchant['type_id'])->value('margin');
$margin = bcsub($margin, $merchant['paid_margin'], 2);
} else {
$margin = $merchant['margin'];
$margin = bcsub($margin,$merchant['paid_margin'],2);
}else{
$margin=$merchant['margin'];
}
if ($margin == 0) {
if($margin==0){
return app('json')->fail('当前金额为0,不能进行充值');
}
$orderSn = "bzj" . date('YmdHis') . uniqid();