Browse Source

修改商品加名称权限

master
Lemon 5 years ago
parent
commit
69e053c9d0
  1. 3
      app/Service/v3/Implementations/GoodsService.php

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

Loading…
Cancel
Save