ソースを参照

feat: 提现审核

xiansin 2 年 前
コミット
4f3f6e9d95
1 ファイル変更8 行追加0 行削除
  1. 8 0
      server/app/Admin/Actions/Form/WithdrawReview.php

+ 8 - 0
server/app/Admin/Actions/Form/WithdrawReview.php

xqd xqd
@@ -5,6 +5,7 @@ namespace App\Admin\Actions\Form;
 use App\Models\User;
 use App\Models\UserEpisodesRecord;
 use App\Models\UserWithdraw;
+use Carbon\Carbon;
 use Dcat\Admin\Contracts\LazyRenderable;
 use Dcat\Admin\Traits\LazyWidget;
 use Dcat\Admin\Widgets\Form;
@@ -21,6 +22,13 @@ class WithdrawReview extends Form implements LazyRenderable
             $withdraw = UserWithdraw::find($input['id']);
             if ($status > 0) {
                 $withdraw->status = $status;
+                // 审核通过或者拒绝
+                if($status == 1 || $status == 3){
+                    $withdraw->review_at = Carbon::now()->toDateTimeString();
+                }
+                if($status == 2){
+                    $withdraw->withdraw_at = Carbon::now()->toDateTimeString();
+                }
                 $withdraw->save();
             }