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');