diff --git a/app/controller/api/server/StoreProduct.php b/app/controller/api/server/StoreProduct.php index 8c2871d7..f210075a 100644 --- a/app/controller/api/server/StoreProduct.php +++ b/app/controller/api/server/StoreProduct.php @@ -138,8 +138,12 @@ class StoreProduct extends BaseController $data['mer_id'] = $merId; $typeSupplyChainId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeSupplyChain'])->value('mer_type_id'); $productType = $merchant->type_id == $typeSupplyChainId ? 98 : 0; - $this->repository->edit($id, $data, $merId, $productType, 1); - return app('json')->success('编辑成功'); + $product=$this->repository->edit($id, $data, $merId, $productType, 1); + if ($product) { + return app('json')->success('编辑成功'); + } else { + return app('json')->fail('编辑失败'); + } } /**