更新店铺查询条件
This commit is contained in:
parent
58f8315614
commit
1200f9ebef
@ -31,7 +31,7 @@ class Merchant extends BaseModel
|
|||||||
const TypeStore = 10; //镇街店铺
|
const TypeStore = 10; //镇街店铺
|
||||||
const TypeCloudWarehouse = 11; //镇级云仓
|
const TypeCloudWarehouse = 11; //镇级云仓
|
||||||
const TypeSupplyChain = 12; //市级供应链
|
const TypeSupplyChain = 12; //市级供应链
|
||||||
const TypePlatform = 13; //市级云仓
|
const TypePlatform = 13; //市级里海云
|
||||||
const TypeTeamServer = 14; //小组服务团
|
const TypeTeamServer = 14; //小组服务团
|
||||||
const TypeVillageServer = 15; //村服务团队
|
const TypeVillageServer = 15; //村服务团队
|
||||||
const TypeTownServer = 16; //镇服务团队
|
const TypeTownServer = 16; //镇服务团队
|
||||||
@ -42,7 +42,7 @@ class Merchant extends BaseModel
|
|||||||
'TypeStore', //镇街店铺
|
'TypeStore', //镇街店铺
|
||||||
'TypeCloudWarehouse', //镇级云仓
|
'TypeCloudWarehouse', //镇级云仓
|
||||||
'TypeSupplyChain', //市级供应链
|
'TypeSupplyChain', //市级供应链
|
||||||
'TypePlatform', //市级云仓
|
'TypePlatform', //市级里海云
|
||||||
'TypeTeamServer', //小组服务团
|
'TypeTeamServer', //小组服务团
|
||||||
'TypeVillageServer', //村服务团队
|
'TypeVillageServer', //村服务团队
|
||||||
'TypeTownServer', //镇服务团队
|
'TypeTownServer', //镇服务团队
|
||||||
|
@ -55,7 +55,6 @@ class MerchantTypeRepository extends BaseRepository
|
|||||||
$merTypeIds = [];
|
$merTypeIds = [];
|
||||||
$queryBuilder = MerchantType::getDB();
|
$queryBuilder = MerchantType::getDB();
|
||||||
if ($this->userApply) {
|
if ($this->userApply) {
|
||||||
$merTypeIds = [];
|
|
||||||
$queryBuilder = $queryBuilder->where('is_allow_apply', 1);
|
$queryBuilder = $queryBuilder->where('is_allow_apply', 1);
|
||||||
} else {
|
} else {
|
||||||
$queryBuilder = $queryBuilder->where('is_search_display', 1);
|
$queryBuilder = $queryBuilder->where('is_search_display', 1);
|
||||||
@ -71,7 +70,7 @@ class MerchantTypeRepository extends BaseRepository
|
|||||||
// }
|
// }
|
||||||
$queryBuilder = $queryBuilder->where('type_code', '<>', 'TypeSupplyChain');
|
$queryBuilder = $queryBuilder->where('type_code', '<>', 'TypeSupplyChain');
|
||||||
}
|
}
|
||||||
$merTypeIds = $queryBuilder->column('mer_type_id');
|
$merTypeIds = $queryBuilder->fetchSql(false)->column('mer_type_id');
|
||||||
$query = MerchantType::getDB()->when(!$getAll, function ($query) use ($merTypeIds) {
|
$query = MerchantType::getDB()->when(!$getAll, function ($query) use ($merTypeIds) {
|
||||||
$query->whereIn('mer_type_id', $merTypeIds);
|
$query->whereIn('mer_type_id', $merTypeIds);
|
||||||
})->field('mer_type_id,type_name');
|
})->field('mer_type_id,type_name');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user