0.使用模拟数据进行充值和提现
1.优化提现接口/api/finance/withdrawCreate 2.优化充值接口/api/finance/depositCreate
This commit is contained in:
@@ -96,7 +96,7 @@ final class DepositSettlement
|
||||
];
|
||||
}
|
||||
|
||||
if ($status !== 0) {
|
||||
if ($status !== 0 && $status !== 3) {
|
||||
throw new RuntimeException('Order status does not allow settlement');
|
||||
}
|
||||
|
||||
@@ -139,9 +139,10 @@ final class DepositSettlement
|
||||
|
||||
Db::startTrans();
|
||||
try {
|
||||
$statusBefore = $status === 3 ? 3 : 0;
|
||||
$affected = Db::name('deposit_order')
|
||||
->where('id', $orderId)
|
||||
->where('status', 0)
|
||||
->where('status', $statusBefore)
|
||||
->update([
|
||||
'status' => 1,
|
||||
'pay_time' => $now,
|
||||
|
||||
Reference in New Issue
Block a user