bug修复

This commit is contained in:
张松
2025-08-20 10:45:51 +08:00
parent 7b55b23609
commit c2c2a740fb

View File

@@ -159,9 +159,12 @@ class WithDraw
throw new SysException("可提现余额不足"); throw new SysException("可提现余额不足");
} }
self::checkCanCash($userId, 1, $amount);
if (!self::checkCanCash($userId, 1, $amount)) {
$cashInfo['state'] = 3;
$cashInfo['content'] = "成功提现:$amount";
$cashInfo['relation_id'] = '单次提现超额';
}else {
if($flag) { if($flag) {
$cashInfo['state'] = 4; $cashInfo['state'] = 4;
$resp = WuYouPayUtils::extractOrder($isAlipay, $cashInfo['order_number'], $userId, $amount, $isSys, $cashInfo['zhifubao'], $cashInfo['zhifubao_name'], $resp = WuYouPayUtils::extractOrder($isAlipay, $cashInfo['order_number'], $userId, $amount, $isSys, $cashInfo['zhifubao'], $cashInfo['zhifubao_name'],
@@ -176,6 +179,10 @@ class WithDraw
throw new SysException($resp['error_msg']); throw new SysException($resp['error_msg']);
} }
} }
}
// 插入提现记录 // 插入提现记录
unset($cashInfo['id_card_no']); unset($cashInfo['id_card_no']);
unset($cashInfo['content']); unset($cashInfo['content']);
@@ -220,10 +227,12 @@ class WithDraw
throw new SysException("【923】单次提现超额未配置"); throw new SysException("【923】单次提现超额未配置");
} }
if (bccomp($money, $commonInfo['value']) > 0) { if (bccomp($money, $commonInfo['value']) > 0) {
throw new SysException("单次提现超额"); return false;
} }
} }
return true;
} }
private static function getBankName($json) private static function getBankName($json)