From c0907dbeade2a964283516092c1aa24a766fb14d Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 20 Nov 2023 15:24:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/server/StoreProduct.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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('编辑失败'); + } } /**