查镇级普通商户商品数

This commit is contained in:
chenbo 2023-12-25 18:53:27 +08:00
parent f65c8045b1
commit c382eb9cf2
2 changed files with 17 additions and 0 deletions

View File

@ -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]);
}
/**
* 采购金额和销售金额
*/

View File

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