6
0
Fork 0

修改后台经销商升级

release
vine_liutk 2022-01-19 11:58:32 +08:00 committed by 李静
parent 3c75f9ac9f
commit 7554b990d9
1 changed files with 8 additions and 3 deletions

View File

@ -43,9 +43,14 @@ class DealerEditLvl extends Form implements LazyRenderable
try {
DB::beginTransaction();
//执行自己升级
$dealer->update([
'lvl'=>$input['lvl'],
]);
$dealer->upgrade(DealerLvl::from($input['lvl']), '后台修改等级');
//执行上级尝试升级
foreach ($dealer->getDealers() as $parentDealer) {
$parentDealer->attemptUpgrade();
}
// $dealer->update([
// 'lvl'=>$input['lvl'],
// ]);
DB::commit();
} catch (Throwable $th) {