From 69e053c9d03cce399fe7ea47c573d5dca6e4b53e Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Wed, 23 Sep 2020 20:47:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81=E5=8A=A0?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/GoodsService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Service/v3/Implementations/GoodsService.php b/app/Service/v3/Implementations/GoodsService.php index 90d4445..396275e 100644 --- a/app/Service/v3/Implementations/GoodsService.php +++ b/app/Service/v3/Implementations/GoodsService.php @@ -82,6 +82,9 @@ class GoodsService implements GoodsServiceInterface if (empty($goods)) { throw new ErrorCodeException( ErrorCode::GOODS_NOT_EXISTS); } + if(isset($params['name']) && !empty($params['name'])) { + $goods->name = $params['name']; + } $goods->price = $params['price']; $goods->on_sale = $params['on_sale']; return $goods->save();