feat: #10000 日志记录修改
This commit is contained in:
parent
b20abf00d6
commit
5475a468af
@ -92,10 +92,15 @@ class GoodsSkusController extends Controller
|
||||
$this->addLog($id, 'update');
|
||||
// 商品更新
|
||||
$goods = Goods::query()->find($sku->goods_id);
|
||||
$this->log = new LogModel([
|
||||
'module' => 'goods',
|
||||
'action' => $request->getMethod(),
|
||||
'target_type' => 'goods',
|
||||
]);
|
||||
$this->setBeforeUpdate($goods->toArray());
|
||||
$goods->update($request->goods);
|
||||
$this->setAfterUpdate($goods->toArray());
|
||||
$this->addLog($sku->goods_id, 'update', 'goods');
|
||||
$this->addLog($sku->goods_id, 'update');
|
||||
DB::commit();
|
||||
} catch (\Exception $exception) {
|
||||
DB::rollBack();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user