update change plan update transfer

This commit is contained in:
Tokumeikoi 2020-05-23 01:38:27 +08:00
parent 71c42765fc
commit 59672a6f2c
2 changed files with 6 additions and 3 deletions

View File

@ -30,9 +30,12 @@ class PlanController extends Controller
abort(500, '该订阅不存在'); abort(500, '该订阅不存在');
} }
DB::beginTransaction(); DB::beginTransaction();
// update user group id // update user group id and transfer
try { 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); $plan->update($params);
} catch (\Exception $e) { } catch (\Exception $e) {
DB::rollBack(); DB::rollBack();

File diff suppressed because one or more lines are too long