|
@@ -126,10 +126,10 @@ class Business extends Api |
|
@@ -126,10 +126,10 @@ class Business extends Api |
126
|
$keyfield=$this->postParam['keyfield'];
|
126
|
$keyfield=$this->postParam['keyfield'];
|
127
|
$page = $this->request->post('page', 1);
|
127
|
$page = $this->request->post('page', 1);
|
128
|
$total = $this->request->post('total', 10);
|
128
|
$total = $this->request->post('total', 10);
|
129
|
- $where="a.verification_store_id=".$this->store_id;
|
129
|
+ $where['a.verification_store_id'] =['=', $this->store_id];
|
130
|
if($keyfield){
|
130
|
if($keyfield){
|
131
|
- $where.=" and (c.receive_no like %{$keyfield}% or e.mobile like %{$keyfield}%)";
|
|
|
132
|
-
|
131
|
+ $where['c.receive_no'] =['like', '%' . $keyfield . '%'];
|
|
|
132
|
+ $where['e.mobile'] = ['like', '%' . $keyfield . '%'];
|
133
|
}
|
133
|
}
|
134
|
$field = "a.id,a.createtime,b.name,d.name as coupon_name,c.type";
|
134
|
$field = "a.id,a.createtime,b.name,d.name as coupon_name,c.type";
|
135
|
$cancel=Db::name('verification_cancel')
|
135
|
$cancel=Db::name('verification_cancel')
|
|
@@ -139,7 +139,8 @@ class Business extends Api |
|
@@ -139,7 +139,8 @@ class Business extends Api |
139
|
->join('verification_coupon d','c.verification_coupon_id=d.id')
|
139
|
->join('verification_coupon d','c.verification_coupon_id=d.id')
|
140
|
->join('user e','c.user_id=e.id')
|
140
|
->join('user e','c.user_id=e.id')
|
141
|
->where($where)
|
141
|
->where($where)
|
142
|
- ->fetchSql()->select();
|
142
|
+ ->paginate($total, false, ['page' => $page])
|
|
|
143
|
+ ->toArray();
|
143
|
$this->success('查询成功',$cancel);
|
144
|
$this->success('查询成功',$cancel);
|
144
|
|
145
|
|
145
|
}
|
146
|
}
|
|
@@ -159,6 +160,8 @@ class Business extends Api |
|
@@ -159,6 +160,8 @@ class Business extends Api |
159
|
* 6、订单查询
|
160
|
* 6、订单查询
|
160
|
*/
|
161
|
*/
|
161
|
public function selectorder(){
|
162
|
public function selectorder(){
|
|
|
163
|
+ $keyfield=$this->postParam['keyfield'];
|
|
|
164
|
+
|
162
|
$page = $this->request->post('page', 1);
|
165
|
$page = $this->request->post('page', 1);
|
163
|
$total = $this->request->post('total', 10);
|
166
|
$total = $this->request->post('total', 10);
|
164
|
$where["a.verification_store_id"] = ["=", $this->store_id];
|
167
|
$where["a.verification_store_id"] = ["=", $this->store_id];
|