|
|
@@ -29,15 +29,14 @@ class Shops extends Base
|
|
|
$spec_id = $this->request->post('spec_id/d', 0); //规格
|
|
|
$customer = $this->request->post('customer_name/s', ''); //客户
|
|
|
$num = $this->request->post('num/d', 0); //数量
|
|
|
-
|
|
|
$limit = $this->request->post('limit/d', 15); //条数
|
|
|
$where['a.user_id'] = $this->userinfo['id'];
|
|
|
- if($plat_id > 0) $where['a.plat_id'] = $plat_id;
|
|
|
- if($shop_id > 0) $where['a.shop_id'] = $shop_id;
|
|
|
- if($variety_id > 0) $where['a.variety_id']= $variety_id;
|
|
|
- if($spec_id > 0) $where['a.spec_id'] = $spec_id;
|
|
|
- if(!empty($customer)) $where['customer_name'] = ['like', '%'.$customer.'%'];
|
|
|
- if($num > 0) $where['a.num']= $num;
|
|
|
+ if($plat_id > 0) $where[] = ['a.plat_id','=', $plat_id]; //'a.plat_id'
|
|
|
+ if($shop_id > 0) $where[] = ['a.shop_id','=', $shop_id]; //'a.shop_id'
|
|
|
+ if($variety_id > 0) $where[] = ['a.variety_id','=', $variety_id]; //'a.variety_id'
|
|
|
+ if($spec_id > 0) $where[] = ['a.spec_id','=', $spec_id]; //'a.spec_id'
|
|
|
+ if(!empty($customer)) $where[] = ['u.name','like', "%{$customer}%"];
|
|
|
+ if($num > 0) $where[] = ['a.num','=', $num]; //'a.num'
|
|
|
|
|
|
$result = $shopDelivery::alias('a')
|
|
|
->leftjoin('shop_list b', 'a.shop_id = b.id') //店铺
|