diff --git a/app/controller/api/Statistics.php b/app/controller/api/Statistics.php index 55242641..92d7d63b 100644 --- a/app/controller/api/Statistics.php +++ b/app/controller/api/Statistics.php @@ -333,6 +333,22 @@ class Statistics extends BaseController return app('json')->success(compact('list')); } + public function GeneralMerchant() + { + $parmas = $this->request->param(); + + $where[] = ['street_id', '=', $parmas['street_code']]; + $where[] = ['is_del', '=', 0]; + $where[] = ['status', '=', 1]; + // 镇级普通商户 type_code = TypeStore + $merchantType = MerchantType::where('type_code', 'TypeStore')->find(); + + $where[] = ['type_id', '=', $merchantType['mer_type_id']]; + + $list = Db::name('merchant')->where($where)->select(); + + return app('json')->success(compact('list')); + } /** * 商户商品数量查询 diff --git a/route/api.php b/route/api.php index e321a766..04cf267c 100644 --- a/route/api.php +++ b/route/api.php @@ -739,6 +739,7 @@ Route::group('api/', function () { Route::get('supply_chain_village_breeding_price_count', '/SupplyChainVillageBreedingPriceCount'); Route::get('store_order_user_trade_amount', '/StoreOrderUserTradeAmount'); Route::get('supply_chain_merchant', '/SupplyChainMerchant'); + Route::get('general_merchant', '/GeneralMerchant'); Route::get('supply_chain_product', '/SupplyChainProduct'); Route::get('supply_chain_product_stock_count1', '/SupplyChainProductStockCount1'); Route::get('supply_chain_product_price', '/SupplyChainProductPrice');