Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
6f1e2581
Commit
6f1e2581
authored
Mar 05, 2018
by
zfc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冲突2
parent
2a618214
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
3 deletions
+37
-3
Client.php
application/api_broker/controller/Client.php
+1
-1
Agents.php
application/model/Agents.php
+4
-0
Users.php
application/model/Users.php
+32
-2
No files found.
application/api_broker/controller/Client.php
View file @
6f1e2581
...
...
@@ -145,7 +145,7 @@ class Client extends Basic
$order
=
"id desc"
;
$data
[
'list'
]
=
$table
->
getAgentUserTb
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$where
);
$total
=
$table
->
get
UserAgentTotal
(
$where
);
$total
=
$table
->
get
MyUserCount
(
$where
);
$data
[
'total'
]
=
ceil
(
$total
/
$pageSize
);
$data
[
'page'
]
=
$pageNo
;
return
$this
->
response
(
200
,
'成功'
,
$data
);
...
...
application/model/Agents.php
View file @
6f1e2581
...
...
@@ -122,6 +122,10 @@ class Agents extends Model
return
$data
;
}
/**
* 查询经纪人列表
*
...
...
application/model/Users.php
View file @
6f1e2581
...
...
@@ -32,6 +32,15 @@ class Users extends Model
}
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'
)
{
$data
=
$this
...
...
@@ -104,9 +113,11 @@ class Users extends Model
/**
* 获取查询用户和经纪人总数
*
* @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
)
{
if
(
$params
[
'invite'
])
{
...
...
@@ -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
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
)
{
return
db
(
'u_users'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment