被return 掉

This commit is contained in:
邓皓元 2019-04-18 11:23:12 +08:00
parent 15436bddd0
commit 9955ddcb77

View File

@ -152,7 +152,6 @@ class ProductService extends Service
}
$this->productRepository->setModel($node)->update($attributes);
return $node;
} else {
$attributes['sn'] = self::sn($package['sn'], $attributes['company_id']);
$attributes['created_at'] = date('Y-m-d H:i:s');
@ -162,6 +161,7 @@ class ProductService extends Service
$this->productRepository->forgetCached();
$node = $this->productRepository->where('sn', $attributes['sn'])->first();
}
DB::commit();
} catch (\Exception $e) {
DB::rollback();