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();