|
|
@@ -18,6 +18,28 @@ class Withdraw extends Controller
|
|
|
{
|
|
|
|
|
|
|
|
|
+ public function setNote()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+
|
|
|
+
|
|
|
+ $params = request()->validate([
|
|
|
+ 'id' => ['required', 'integer', 'min:1'],
|
|
|
+ 'admin_note' => ['required', 'string', 'min:1', 'max:120'],
|
|
|
+ ]);
|
|
|
+ $w = WithdrawModel::where('id', $params['id'])->first();
|
|
|
+ if (!$w) throw new Exception("记录不存在", HttpStatus::CUSTOM_ERROR);
|
|
|
+ $w->admin_note = $params['admin_note'];
|
|
|
+ $w->save();
|
|
|
+ } catch (ValidationException $e) {
|
|
|
+ return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());
|
|
|
+ } catch (Exception $e) {
|
|
|
+ return $this->error(HttpStatus::CUSTOM_ERROR, $e->getMessage());
|
|
|
+ }
|
|
|
+ return $this->success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* @api {get} /admin/withdraw 提现列表
|
|
|
* @apiGroup 提现管理
|
|
|
@@ -77,10 +99,7 @@ class Withdraw extends Controller
|
|
|
$item['service_charge'] = floatval($item['service_charge']);
|
|
|
$item['amount'] = floatval($item['amount']);
|
|
|
$item['to_account'] = floatval($item['to_account']);
|
|
|
- $item['to_account_usdt'] = floatval(bcdiv($item['to_account'],$item['exchange_rate'],4));
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ $item['to_account_usdt'] = floatval(bcdiv($item['to_account'], $item['exchange_rate'], 4));
|
|
|
}
|
|
|
|
|
|
|