作者 郭文星

'123'

... ... @@ -155,10 +155,12 @@ class Business extends Base
$page = $this->request->post('page', 1);
$total = $this->request->post('total', 10);
$where['a.verification_store_id'] =['=', $this->store_id];
$wheres=[];
if($keyfield){
$where['c.receive_no'] =['like', '%' . $keyfield . '%'];
$where['e.mobile'] = ['like', '%' . $keyfield . '%'];
$wheres['c.receive_no'] =['like', '%' . $keyfield . '%'];
$wheres['e.mobile']= ['like', '%' . $keyfield . '%'];
}
$field = "a.id,a.createtime,b.name,d.name as coupon_name,c.type,DATE_FORMAT(FROM_UNIXTIME(c.closetime), '%Y-%m-%d %H:%i:%S') AS closetime,c.type,c.receive_no";
$cancel=Db::name('verification_cancel')
->alias('a')
... ... @@ -168,6 +170,7 @@ class Business extends Base
->field($field)
->join('user e','c.user_id=e.id')
->where($where)
->whereOr($wheres)
->paginate($total, false, ['page' => $page])
->toArray();
$this->success('查询成功',$cancel);
... ... @@ -194,15 +197,17 @@ class Business extends Base
$page = $this->request->post('page', 1);
$total = $this->request->post('total', 10);
$where["a.verification_store_id"] = ["=", $this->store_id];
$wheres=[];
if($keyfield){
$where['a.phone'] =['like', '%' . $keyfield . '%'];
$where['a.order_no'] = ['like', '%' . $keyfield . '%'];
$wheres['a.phone'] =['like', '%' . $keyfield . '%'];
$wheres['a.order_no'] = ['like', '%' . $keyfield . '%'];
}
$field = "a.price,b.image,a.id,a.order_no,a.name,a.phone,a.type,b.title,DATE_FORMAT(FROM_UNIXTIME(a.paytime), '%Y-%m-%d %H:%i:%S') AS paytime,a.type";
$order=Db::name('verification_order')
->alias('a')
->join('verification_activity b','a.verification_activity_id=b.id')
->where($where)
->whereOr($wheres)
->field($field)
->paginate($total, false, ['page' => $page])
->toArray();
... ...