From 5475a468af987c5d021209ea891ae5d3b59c8c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=B8=96=E7=95=8C?= <642747453@qq.com> Date: Tue, 9 Aug 2022 20:40:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20#10000=20=E6=97=A5=E5=BF=97=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Goods/GoodsSkusController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Goods/GoodsSkusController.php b/app/Http/Controllers/Goods/GoodsSkusController.php index ab40a9b..701fab0 100644 --- a/app/Http/Controllers/Goods/GoodsSkusController.php +++ b/app/Http/Controllers/Goods/GoodsSkusController.php @@ -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();