Merge pull request 'dev' (#20) from dev into preview

Reviewed-on: #20
This commit is contained in:
mkm 2023-09-27 10:04:18 +08:00
commit 328491332d
23 changed files with 45 additions and 19 deletions

View File

@ -192,7 +192,6 @@ class SpuRepository extends BaseRepository
unset($where['mer_id'], $where['page']);
$page = 1;
}
$entryMerId = $where['entry_mer_id'] ?? '';
unset($where['entry_mer_id']);
$query = $this->dao->search($where);

View File

@ -63,18 +63,21 @@ class CloudWarehouse extends BaseController
if (empty($merchantIds)) {
return app('json')->success(['count' => 0, 'list' => []]);
}
$typeCloudWarehouseId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeCloudWarehouse'])->value('mer_type_id');
$entryWhere = [
'street_id' => $params['street_code'],
'type_id' => $typeCloudWarehouseId,
'status' => 1,
'is_del' => 0,
'mer_state' => 1,
];
if (!empty($params['category_id'])) {
$entryWhere['category_id'] = $params['category_id'];
}
$where['entry_mer_id'] = $this->merchantDao->search($entryWhere)->value('mer_id');
// 隐藏镇级云仓
// $typeCloudWarehouseId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeCloudWarehouse'])->value('mer_type_id');
// $entryWhere = [
// 'street_id' => $params['street_code'],
// 'type_id' => $typeCloudWarehouseId,
// 'status' => 1,
// 'is_del' => 0,
// 'mer_state' => 1,
// ];
// if (!empty($params['category_id'])) {
// $entryWhere['category_id'] = $params['category_id'];
// }
// $where['entry_mer_id'] = $this->merchantDao->search($entryWhere)->value('mer_id');
$where['entry_mer_id'] = 0;
$where['keyword'] = $params['keyword'];
$where['mer_ids'] = $merchantIds;
$where['product_type'] = $params['product_type'];

View File

@ -144,17 +144,14 @@ class StoreSpu extends BaseController
if ($where['action']) unset($where['product_type']);
$currentMerchant = Db::name('merchant')->where('mer_id',$id)->field('category_id,street_id')->find();
$typeTownSupplyChainId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeTownSupplyChain'])->value('mer_type_id');
$where['mer_array_id'][] = $id;
$mer_id = Db::name('merchant')
$merIdArray = Db::name('merchant')
->where('street_id',$currentMerchant['street_id'])
->where('mer_state',1)
->where('status',1)
->where('category_id',$currentMerchant['category_id'])
->where('type_id', $typeTownSupplyChainId)
->value('mer_id');
if ($mer_id) {
$where['mer_array_id'][] = $mer_id;
}
->column('mer_id');
$where['mer_array_id'] = $merIdArray;
// $where['mer_id'] = $mer_id;
$where['entry_mer_id'] = $id;
$where['is_gift_bag'] = 0;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long