This commit is contained in:
Tokumeikoi 2020-03-05 16:19:32 +08:00
parent e97f6c64a0
commit c3898ec795
4 changed files with 6 additions and 9 deletions

View File

@ -29,12 +29,9 @@ class PlanController extends Controller
abort(500, '该订阅不存在'); abort(500, '该订阅不存在');
} }
DB::beginTransaction(); DB::beginTransaction();
if (!User::where('plan_id', $plan->id) // update user group id
->update(['group_id' => $plan->group_id]) User::where('plan_id', $plan->id)
) { ->update(['group_id' => $plan->group_id]);
DB::rollBack();
abort(500, '保存失败');
}
if (!$plan->update($params)) { if (!$plan->update($params)) {
DB::rollBack(); DB::rollBack();
abort(500, '保存失败'); abort(500, '保存失败');

View File

@ -236,5 +236,5 @@ return [
| The only modification by laravel config | The only modification by laravel config
| |
*/ */
'version' => '1.2' 'version' => '1.2.1'
]; ];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long