修改后台经销商升级
parent
3c75f9ac9f
commit
7554b990d9
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue