1.分销推广页我的推广店铺列表
This commit is contained in:
parent
a98ad465f0
commit
9edf49a3a5
@ -221,6 +221,47 @@ class User extends Api
|
||||
];
|
||||
return JsonServer::success('', $data);
|
||||
}
|
||||
|
||||
public function newShops()
|
||||
{
|
||||
$page = $this->request->get('page_no', $this->page_no);
|
||||
$size = $this->request->get('page_size', $this->page_size);
|
||||
$type = $this->request->get('type');
|
||||
$user_id = $this->user_id;
|
||||
$p = $page*$size;
|
||||
//查询条件
|
||||
if($type == 1){
|
||||
$sql = "SELECT * FROM ls_user a,ls_shop_apply b WHERE a.id = b.user_id and
|
||||
a.first_leader = '.$user_id.' and a.disable = 0 and a.del = 0 and b.del=0
|
||||
and b.audit_status = 2 limit".$p.",".$size;
|
||||
$lists = Db::query($sql);
|
||||
$sql = "SELECT count(*) as cont FROM ls_user a,ls_shop_apply b WHERE a.id = b.user_id and
|
||||
a.first_leader = '.$user_id.' and a.disable = 0 and a.del = 0 and b.del=0
|
||||
and b.audit_status = 2 group by a.first_leader";
|
||||
$count = Db::query($sql);
|
||||
$count = $count['cont'];
|
||||
}else{
|
||||
$sql = "SELECT * FROM ls_user a,ls_local_store b WHERE a.id = b.user_id and
|
||||
a.first_leader = '.$user_id.' and a.disable = 0 and a.del = 0 and b.is_delete=0
|
||||
and b.store_state = 1 limit".$p.",".$size;
|
||||
$lists = Db::query($sql);
|
||||
$sql = "SELECT count(*) as cont FROM ls_user a,ls_local_store b WHERE a.id = b.user_id and
|
||||
a.first_leader = '.$user_id.' and a.disable = 0 and a.del = 0 and b.is_delete=0
|
||||
and b.store_state = 1 group by a.first_leader";
|
||||
$count = Db::query($sql);
|
||||
$count = $count['cont'];
|
||||
}
|
||||
$data = [
|
||||
'list' => $lists,
|
||||
'page' => $page,
|
||||
'size' => $size,
|
||||
'count' => $count,
|
||||
'more' => is_more($count, $page, $size)
|
||||
];
|
||||
return JsonServer::success('', $data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 用户聊天记录
|
||||
* @return \think\response\Json
|
||||
|
||||
Loading…
Reference in New Issue
Block a user