From 2e2a31df0de111d830cebcf2683886bbc5e01aca Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Fri, 8 Sep 2023 13:43:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E9=93=BE=E5=95=86=E5=AE=B6=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/community/Community.php | 14 ++++++++++++++ route/api.php | 1 + 2 files changed, 15 insertions(+) diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 9cb74c1f..4486dea8 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -697,6 +697,20 @@ class Community extends BaseController return app('json')->success('审核操作成功'); } + /** + * 供应链商家列表 + * @return mixed + */ + public function supplychainList() + { + $typeSupplyChainId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeSupplyChain'])->value('mer_type_id'); + [$page, $limit] = $this->getPage(); + $queryBuilder = Db::name('merchant')->where('type_id', $typeSupplyChainId)->where('is_del', 0)->where('status', 1); + $count = $queryBuilder->count(); + $list = $queryBuilder->setOption('field', [])->field(['mer_id', 'mer_name', 'area_id', 'street_id', 'village_id', 'mer_avatar', 'mer_banner', 'mer_address'])->order('mer_id', 'desc')->page($page, $limit)->fetchSql(false)->select(); + return app('json')->success(compact('count', 'list')); + } + /** * 委托商品列表 * @return mixed diff --git a/route/api.php b/route/api.php index c816d765..1f405e58 100644 --- a/route/api.php +++ b/route/api.php @@ -378,6 +378,7 @@ Route::group('api/', function () { Route::post('resale/delete/:id', 'Community/deleteResale'); Route::post('resale/check/:id', 'Community/checkResale'); + Route::get('/supplychain/list', 'Community/supplychainList'); Route::post('/entrust', 'Community/entrust'); Route::get('/entrust/list', 'Community/entrustList'); Route::post('/entrust/check/:id', 'Community/checkEntrust');