bug修复
This commit is contained in:
@@ -159,23 +159,30 @@ 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) {
|
||||||
|
$cashInfo['state'] = 4;
|
||||||
|
$resp = WuYouPayUtils::extractOrder($isAlipay, $cashInfo['order_number'], $userId, $amount, $isSys, $cashInfo['zhifubao'], $cashInfo['zhifubao_name'],
|
||||||
|
$cashInfo['bank_name'], !empty($cashInfo['province'])?$cashInfo['province']:'', !empty($cashInfo['city'])?$cashInfo['city']:'', !empty($cashInfo['bank_branch'])?$cashInfo['bank_branch']:'');
|
||||||
|
if (isset($resp['status']) && ($resp['status'] == 2 || $resp['status'] == 10000)) {
|
||||||
|
$cashInfo['content'] = "成功提现:$amount";
|
||||||
|
$cashInfo['state'] = 1;
|
||||||
|
$cashInfo['out_at'] = getNormalDate();
|
||||||
|
}
|
||||||
|
|
||||||
if($flag) {
|
if (!empty($resp['error_msg'])){
|
||||||
$cashInfo['state'] = 4;
|
throw new SysException($resp['error_msg']);
|
||||||
$resp = WuYouPayUtils::extractOrder($isAlipay, $cashInfo['order_number'], $userId, $amount, $isSys, $cashInfo['zhifubao'], $cashInfo['zhifubao_name'],
|
}
|
||||||
$cashInfo['bank_name'], !empty($cashInfo['province'])?$cashInfo['province']:'', !empty($cashInfo['city'])?$cashInfo['city']:'', !empty($cashInfo['bank_branch'])?$cashInfo['bank_branch']:'');
|
|
||||||
if (isset($resp['status']) && ($resp['status'] == 2 || $resp['status'] == 10000)) {
|
|
||||||
$cashInfo['content'] = "成功提现:$amount";
|
|
||||||
$cashInfo['state'] = 1;
|
|
||||||
$cashInfo['out_at'] = getNormalDate();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($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)
|
||||||
|
|||||||
Reference in New Issue
Block a user