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