|
@@ -92,11 +92,13 @@ class Withdraw extends Controller
|
|
|
]);
|
|
]);
|
|
|
$id = request()->input('id');
|
|
$id = request()->input('id');
|
|
|
$status = request()->input('status');
|
|
$status = request()->input('status');
|
|
|
- // 汇率
|
|
|
|
|
- $rate = Config::where('field', 'exchange_rate_rmb')->first()->val??1;
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
$w = WithdrawService::findOne(['id' => $id, 'status' => 0]);
|
|
$w = WithdrawService::findOne(['id' => $id, 'status' => 0]);
|
|
|
|
|
+
|
|
|
if (!$w) throw new Exception("数据不存在", HttpStatus::CUSTOM_ERROR);
|
|
if (!$w) throw new Exception("数据不存在", HttpStatus::CUSTOM_ERROR);
|
|
|
|
|
+ // 汇率
|
|
|
|
|
+ $rate = $w->exchange_rate??1;
|
|
|
if ($status == 1) {
|
|
if ($status == 1) {
|
|
|
$w->status = 1;
|
|
$w->status = 1;
|
|
|
$w->save();
|
|
$w->save();
|