mirror of
https://gitee.com/liuxioabin/fengketrade.git
synced 2026-04-17 12:57:32 +08:00
up
This commit is contained in:
parent
313061e30b
commit
b7ded5d703
@ -201,9 +201,10 @@ class Withdraw
|
||||
|
||||
Db::commit();
|
||||
} catch (ShoproException $e) {
|
||||
Db::commit(); // 不回滚,记录错误日志
|
||||
Db::rollback(); // 回滚事务,因为7天限制等原因导致打款失败
|
||||
throw new ShoproException($e->getMessage());
|
||||
} catch (HttpResponseException $e) {
|
||||
Db::rollback();
|
||||
$data = $e->getResponse()->getData();
|
||||
$message = $data ? ($data['msg'] ?? '') : $e->getMessage();
|
||||
throw new ShoproException($message);
|
||||
@ -235,7 +236,8 @@ class Withdraw
|
||||
}
|
||||
|
||||
// 检查7天限制
|
||||
if (isset($this->config['days_7']) && intval($this->config['days_7']) == 1) {
|
||||
$days7Enabled = isset($this->config['days_7']) && (intval($this->config['days_7']) == 1 || $this->config['days_7'] === '1' || $this->config['days_7'] === true);
|
||||
if ($days7Enabled) {
|
||||
$createtime = intval($withdraw->createtime);
|
||||
if ($createtime > 0) {
|
||||
$daysDiff = (time() - $createtime) / 86400; // 86400秒 = 1天
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user