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
30551323
Commit
30551323
authored
Mar 26, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据楼盘id获取经纪人device_id设备id
parent
31af31ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
GHousesToAgents.php
application/model/GHousesToAgents.php
+19
-0
No files found.
application/model/GHousesToAgents.php
View file @
30551323
...
@@ -179,4 +179,23 @@ class GHousesToAgents extends BaseModel
...
@@ -179,4 +179,23 @@ class GHousesToAgents extends BaseModel
return
$select_data
;
return
$select_data
;
}
}
/**
* 根据楼盘id获取经纪人device_id设备id
*
* @param $house_id
* @param int $type
* @return array|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getDevice_id
(
$house_id
,
$type
=
1
)
{
return
$this
->
field
(
'b.id,device_id'
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agents_id = b.id'
,
'left'
)
->
where
(
'houses_id'
,
$house_id
)
->
where
(
'type'
,
$type
)
->
select
();
}
}
}
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