From c382eb9cf258e8604bad33ff1e409d807a72e745 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 25 Dec 2023 18:53:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E9=95=87=E7=BA=A7=E6=99=AE=E9=80=9A?= =?UTF-8?q?=E5=95=86=E6=88=B7=E5=95=86=E5=93=81=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Statistics.php | 16 ++++++++++++++++ route/api.php | 1 + 2 files changed, 17 insertions(+) diff --git a/app/controller/api/Statistics.php b/app/controller/api/Statistics.php index 49b79706..484ed87a 100644 --- a/app/controller/api/Statistics.php +++ b/app/controller/api/Statistics.php @@ -408,6 +408,22 @@ class Statistics extends BaseController return app('json')->success(['count' => $count]); } + /** + * 商户商品库存更新查询 + */ + public function ProductStockCount1() + { + $parmas = $this->request->param(); + + $merchant = Merchant::where('mer_intention_id', $parmas['mer_intention_id'])->find(); + if (empty($merchant) || $merchant['type_id'] != 10) { + return app('json')->success(); + } + $where[] = ['mer_id', '=', $merchant['mer_id']]; + $count = Db::name('store_product_stock')->where($where)->count(); + return app('json')->success(['count' => $count]); + } + /** * 采购金额和销售金额 */ diff --git a/route/api.php b/route/api.php index ceacc3f7..4155f31f 100644 --- a/route/api.php +++ b/route/api.php @@ -743,6 +743,7 @@ Route::group('api/', function () { Route::get('supply_chain_product', '/SupplyChainProduct'); Route::get('general_merchant_product', '/GeneralMerchantProduct'); Route::get('supply_chain_product_stock_count1', '/SupplyChainProductStockCount1'); + Route::get('product_stock_count1', '/ProductStockCount1'); Route::get('supply_chain_product_price', '/SupplyChainProductPrice'); })->prefix('api.Statistics');