作者 chencheng
... ... @@ -126,10 +126,10 @@ class Business extends Api
$keyfield=$this->postParam['keyfield'];
$page = $this->request->post('page', 1);
$total = $this->request->post('total', 10);
$where="a.verification_store_id=".$this->store_id;
$where['a.verification_store_id'] =['=', $this->store_id];
if($keyfield){
$where.=" and (c.receive_no like %{$keyfield}% or e.mobile like %{$keyfield}%)";
$where['c.receive_no'] =['like', '%' . $keyfield . '%'];
$where['e.mobile'] = ['like', '%' . $keyfield . '%'];
}
$field = "a.id,a.createtime,b.name,d.name as coupon_name,c.type";
$cancel=Db::name('verification_cancel')
... ... @@ -139,7 +139,8 @@ class Business extends Api
->join('verification_coupon d','c.verification_coupon_id=d.id')
->join('user e','c.user_id=e.id')
->where($where)
->fetchSql()->select();
->paginate($total, false, ['page' => $page])
->toArray();
$this->success('查询成功',$cancel);
}
... ... @@ -159,6 +160,8 @@ class Business extends Api
* 6、订单查询
*/
public function selectorder(){
$keyfield=$this->postParam['keyfield'];
$page = $this->request->post('page', 1);
$total = $this->request->post('total', 10);
$where["a.verification_store_id"] = ["=", $this->store_id];
... ...
... ... @@ -11,7 +11,7 @@ use think\Exception;
*/
class Client extends Api
{
protected $noNeedLogin = ['*'];
protected $noNeedLogin = [''];
protected $noNeedRight = ['*'];
protected $postParam;
protected $store_id;
... ... @@ -38,8 +38,8 @@ class Client extends Api
}
$this->store = $store;
if (empty($this->auth->id)) {
$this->error("非法操作,用户信息为空");
return;
}
}
... ... @@ -47,7 +47,7 @@ class Client extends Api
* 1、获取活动
*/
public function getactivity(){
$this->success('123',$this->auth->id);
//根据门店查询活动
$time=time();
$where["closetime"] = [">", $time];
... ...
... ... @@ -201,7 +201,7 @@ class Wechat extends Api
if($user_id !=0){
$data['token'] = $this->auth->getToken();
$data['user_info'] = $user;
$data['user_info'] =$this->auth->getUserinfo();
$this->success('完成',$data);
}else{
$this->error('code处理失败');
... ...