更新状态查询

This commit is contained in:
yaooo 2023-09-04 12:49:08 +08:00
parent a5ae312fc3
commit 9f780eb632
2 changed files with 7 additions and 6 deletions

View File

@ -908,11 +908,12 @@ class Auth extends BaseController
public function merchantCate()
{
$cateList = Db::name('MerchantCategory')->field(['merchant_category_id', 'category_name'])->select();
$typeList = [
['merchant_category_id' => Merchant::TypeStore ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeStore] ?? ''],
['merchant_category_id' => Merchant::TypeTownSupplyChain ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeTownSupplyChain] ?? ''],
['merchant_category_id' => Merchant::TypeSupplyChain ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeSupplyChain] ?? '']
];
// $typeList = [
// ['merchant_category_id' => Merchant::TypeStore ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeStore] ?? ''],
// ['merchant_category_id' => Merchant::TypeTownSupplyChain ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeTownSupplyChain] ?? ''],
// ['merchant_category_id' => Merchant::TypeSupplyChain ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeSupplyChain] ?? '']
// ];
$typeList = Db::name('MerchantType')->where('is_allow_apply', 1)->field(['mer_type_id as merchant_category_id', 'type_name as category_name'])->select();
$data = [
'category' => $cateList,
'type' => $typeList

View File

@ -58,7 +58,7 @@ class Merchant extends BaseController
$where = $this->request->params(['keyword', 'order', 'is_best', 'location', 'category_id', 'type_id','is_trader', 'street_id', 'credit_buy']);
if (empty($where['type_id'])) {
//$where['type_id'] = [MerchantModel::TypeCloudWarehouse, MerchantModel::TypeStore, MerchantModel::TypeSupplyChain, MerchantModel::TypePlatform];
$where['type_id'] = [MerchantModel::TypeTownSupplyChain, MerchantModel::TypeStore];
$where['type_id'] = Db::name('MerchantType')->where('is_allow_apply', 1)->where('type_code', '<>', MerchantModel::TypeCode['TypeSupplyChain'])->column('mer_type_id');
}
return app('json')->success($this->repository->getList($where, $page, $limit, $this->userInfo));
}