新增查询供应链商家接口

This commit is contained in:
yaooo 2023-09-08 13:43:58 +08:00
parent c5f440a462
commit 2e2a31df0d
2 changed files with 15 additions and 0 deletions

View File

@ -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

View File

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