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
7f4f294c
Commit
7f4f294c
authored
Jul 09, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u_user_agent
parent
4d4dec0a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
26 deletions
+4
-26
AAgents.php
application/model/AAgents.php
+4
-26
No files found.
application/model/AAgents.php
View file @
7f4f294c
...
...
@@ -1140,30 +1140,6 @@ class AAgents extends BaseModel
return
$result
;
}
/**
* 获取用户的客方经纪人
*
* @param string $field
* @param array $params
* @param int $house_id
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getUserAgent
(
$field
=
''
,
$params
=
[],
$house_id
=
0
)
{
$data
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'u_evaluate b'
,
'a.id = b.agents_id'
,
'left'
)
->
join
(
'g_houses_to_agents c'
,
'a.id=c.agents_id'
,
'left'
)
->
join
(
'u_users d'
,
'a.id = d.agent_id'
,
'left'
)
->
where
(
'c.houses_id'
,
$house_id
)
->
where
(
'c.type'
,
1
)
->
where
(
$params
)
->
find
();
return
$data
;
}
/**
* 查找客方经纪人
*
...
...
@@ -1178,7 +1154,8 @@ class AAgents extends BaseModel
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'u_evaluate b'
,
'a.id = b.agents_id'
,
'left'
)
->
join
(
'u_users c'
,
'a.id = c.agent_id'
,
'left'
)
->
join
(
'u_user_agent d'
,
'a.id=d.agent_id'
,
'left'
)
->
join
(
'u_users c'
,
'd.user_id = c.id'
,
'left'
)
->
where
(
$params
)
->
find
();
}
...
...
@@ -1732,7 +1709,8 @@ class AAgents extends BaseModel
public
function
getAgentUser
(
$field
,
$where
)
{
return
$this
->
alias
(
'a'
)
->
field
(
$field
)
->
join
(
'u_users b'
,
'a.id = b.agent_id'
,
'left'
)
->
join
(
'u_user_agent d'
,
'a.id=d.agent_id'
,
'left'
)
->
join
(
'u_users b'
,
'd.user_id = b.id'
,
'left'
)
->
where
(
$where
)
->
find
();
}
...
...
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