Browse Source

update change plan update transfer

Tokumeikoi 4 years ago
parent
commit
59672a6f2c
2 changed files with 5 additions and 2 deletions
  1. 5 2
      app/Http/Controllers/Admin/PlanController.php
  2. 0 0
      public/assets/user/umi.js

+ 5 - 2
app/Http/Controllers/Admin/PlanController.php

@@ -30,9 +30,12 @@ class PlanController extends Controller
                 abort(500, '该订阅不存在');
             }
             DB::beginTransaction();
-            // update user group id
+            // update user group id and transfer
             try {
-                User::where('plan_id', $plan->id)->update(['group_id' => $plan->group_id]);
+                User::where('plan_id', $plan->id)->update([
+                    'group_id' => $plan->group_id,
+                    'transfer_enable' => $plan->transfer_enable * 1073741824
+                ]);
                 $plan->update($params);
             } catch (\Exception $e) {
                 DB::rollBack();

File diff suppressed because it is too large
+ 0 - 0
public/assets/user/umi.js


Some files were not shown because too many files changed in this diff