|
|
@@ -181,10 +181,13 @@ class Merchant extends BaseController
|
|
181
|
181
|
->field('mer_id')
|
|
182
|
182
|
->select();
|
|
183
|
183
|
if ($hasProductMerIdList) {
|
|
184
|
|
- $where['mer_id'] = array_column($hasProductMerIdList->toArray(), 'mer_id');
|
|
|
184
|
+ $hasProductMerIdList = array_column($hasProductMerIdList->toArray(), 'mer_id');
|
|
185
|
185
|
}
|
|
186
|
|
-
|
|
187
|
|
- $mer_list = Db::name('merchant')->where($where)->page($page)->limit($limit)->select();
|
|
|
186
|
+ $query = Db::name('merchant')->where($where);
|
|
|
187
|
+ if (!empty($hasProductMerIdList) && is_array($hasProductMerIdList)) {
|
|
|
188
|
+ $query->whereIn('mer_id', $hasProductMerIdList);
|
|
|
189
|
+ }
|
|
|
190
|
+ $mer_list = $query->page($page)->limit($limit)->select();
|
|
188
|
191
|
$where['is_gift_bag'] = 0;
|
|
189
|
192
|
$where['is_used'] = 1;
|
|
190
|
193
|
$where['product_type'] = 0;
|