更新状态查询
This commit is contained in:
parent
8e3f1ea28d
commit
e598ca1e21
@ -46,7 +46,7 @@ class CloudWarehouse extends BaseController
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$typeStoreId = Db::name('MerchantType')->where('type_code', MerchantModel::TypeCode['TypeStore'])->value('mer_type_id');
|
||||
$typeStoreId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeStore'])->value('mer_type_id');
|
||||
$params = $this->request->params(['category_id', 'street_code', 'order', ['product_type', 0], 'keyword']);
|
||||
$search = [
|
||||
'street_id' => $params['street_code'],
|
||||
@ -61,9 +61,10 @@ 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' => Merchant::TypeCloudWarehouse,
|
||||
'type_id' => $typeCloudWarehouseId,
|
||||
'category_id' => $params['category_id'],
|
||||
'status' => 1,
|
||||
'is_del' => 0,
|
||||
|
@ -42,6 +42,7 @@ class StoreSpu extends BaseController
|
||||
public function lst()
|
||||
{
|
||||
[$page, $limit] = $this->getPage();
|
||||
$typeStoreId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeStore'])->value('mer_type_id');
|
||||
$where = $this->request->params([
|
||||
'keyword',
|
||||
'cate_id',
|
||||
@ -62,7 +63,7 @@ class StoreSpu extends BaseController
|
||||
$where['is_gift_bag'] = 0;
|
||||
$where['product_type'] = 0;
|
||||
$where['order'] = $where['order'] ?: 'star';
|
||||
$where['mer_ids'] = Merchant::getInstance()->where('type_id', Merchant::TypeStore)
|
||||
$where['mer_ids'] = Merchant::getInstance()->where('type_id', $typeStoreId)
|
||||
->where(['status' => 1, 'mer_state' => 1, 'is_del' => 0])->column('mer_id');
|
||||
if ($where['is_trader'] != 1) unset($where['is_trader']);
|
||||
$data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user