被return 掉
This commit is contained in:
parent
15436bddd0
commit
9955ddcb77
@ -152,7 +152,6 @@ class ProductService extends Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->productRepository->setModel($node)->update($attributes);
|
$this->productRepository->setModel($node)->update($attributes);
|
||||||
return $node;
|
|
||||||
} else {
|
} else {
|
||||||
$attributes['sn'] = self::sn($package['sn'], $attributes['company_id']);
|
$attributes['sn'] = self::sn($package['sn'], $attributes['company_id']);
|
||||||
$attributes['created_at'] = date('Y-m-d H:i:s');
|
$attributes['created_at'] = date('Y-m-d H:i:s');
|
||||||
@ -162,6 +161,7 @@ class ProductService extends Service
|
|||||||
$this->productRepository->forgetCached();
|
$this->productRepository->forgetCached();
|
||||||
$node = $this->productRepository->where('sn', $attributes['sn'])->first();
|
$node = $this->productRepository->where('sn', $attributes['sn'])->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
DB::rollback();
|
DB::rollback();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user