Commit 6f1e2581 authored by zfc's avatar zfc

冲突2

parent 2a618214
...@@ -145,7 +145,7 @@ class Client extends Basic ...@@ -145,7 +145,7 @@ class Client extends Basic
$order="id desc"; $order="id desc";
$data['list']=$table->getAgentUserTb($pageNo, $pageSize,$order,$field, $where); $data['list']=$table->getAgentUserTb($pageNo, $pageSize,$order,$field, $where);
$total=$table->getUserAgentTotal($where); $total=$table->getMyUserCount($where);
$data['total']= ceil($total / $pageSize); $data['total']= ceil($total / $pageSize);
$data['page']=$pageNo; $data['page']=$pageNo;
return $this->response(200,'成功',$data); return $this->response(200,'成功',$data);
......
...@@ -122,6 +122,10 @@ class Agents extends Model ...@@ -122,6 +122,10 @@ class Agents extends Model
return $data; return $data;
} }
/** /**
* 查询经纪人列表 * 查询经纪人列表
* *
......
...@@ -32,6 +32,15 @@ class Users extends Model ...@@ -32,6 +32,15 @@ class Users extends Model
} }
return $data; return $data;
} }
/**
* @param $param
* @param string $fields
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getUserByWhere($param, $fields = 'id,user_phone') public function getUserByWhere($param, $fields = 'id,user_phone')
{ {
$data = $this $data = $this
...@@ -104,9 +113,11 @@ class Users extends Model ...@@ -104,9 +113,11 @@ class Users extends Model
/** /**
* 获取查询用户和经纪人总数 * 获取查询用户和经纪人总数
*
* @param $params * @param $params
* @return mixed * @return int|string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function getUserAgentTotal($params) { public function getUserAgentTotal($params) {
if ($params['invite']) { if ($params['invite']) {
...@@ -126,6 +137,18 @@ class Users extends Model ...@@ -126,6 +137,18 @@ class Users extends Model
} }
/**
* @param $params
* @return int|string
*/
public function getMyUserCount($params){
$result = $this->alias('a')
->where($params)
->count();
return $result;
}
/** /**
* 删除用户 * 删除用户
* *
...@@ -231,6 +254,13 @@ class Users extends Model ...@@ -231,6 +254,13 @@ class Users extends Model
return $r; return $r;
} }
/**
* @param $user_id
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function useraction_search_user_res($user_id) public function useraction_search_user_res($user_id)
{ {
return db('u_users') return db('u_users')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment