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
f1a16b2b
Commit
f1a16b2b
authored
Jan 24, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取经纪人和楼盘关系信息
parent
c7c5034e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
+40
-0
Broker.php
application/index/controller/Broker.php
+28
-0
GHousesToAgents.php
application/model/GHousesToAgents.php
+11
-0
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Broker.php
View file @
f1a16b2b
...
@@ -142,4 +142,31 @@ class Broker extends Basic
...
@@ -142,4 +142,31 @@ class Broker extends Basic
}
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
/**
* 获取经纪人和楼盘关系信息
*
* @return \think\Response
*/
public
function
getAgentsTohouses
()
{
$data
[
'status'
]
=
200
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
$params
=
$this
->
request
->
param
();
if
(
$params
[
'houses_id'
])
{
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
10
:
$params
[
'pageSize'
];
$hg
=
new
GHousesToAgents
();
$fields
=
'a.id,b.name,b.phone'
;
$where
[
'a.is_del'
]
=
[
'='
,
0
];
$where
[
'b.status'
]
=
[
'='
,
0
];
$where
[
'a.type'
]
=
$params
[
'type'
];
$where
[
'a.houses_id'
]
=
$params
[
'houses_id'
];
$data
[
'data'
]
=
$hg
->
getAgentsHousesList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$fields
,
$where
);
}
else
{
$data
[
'status'
]
=
101
;
$data
[
'msg'
]
=
'houses_id is null'
;
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
}
\ No newline at end of file
application/model/GHousesToAgents.php
View file @
f1a16b2b
...
@@ -66,4 +66,15 @@ class GHousesToAgents extends BaseModel
...
@@ -66,4 +66,15 @@ class GHousesToAgents extends BaseModel
return
$res
;
return
$res
;
}
}
public
function
getAgentsHousesList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agents_id = b.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
}
}
application/route.php
View file @
f1a16b2b
...
@@ -69,6 +69,7 @@ Route::group('index', [
...
@@ -69,6 +69,7 @@ Route::group('index', [
'getBroker_new'
=>
[
'index/broker/getBroker_new'
,[
'method'
=>
'get'
]],
'getBroker_new'
=>
[
'index/broker/getBroker_new'
,[
'method'
=>
'get'
]],
'addHousesAgents'
=>
[
'index/broker/AddHousesAgents'
,
[
'method'
=>
'POST'
]],
//新增楼盘与经纪人关系
'addHousesAgents'
=>
[
'index/broker/AddHousesAgents'
,
[
'method'
=>
'POST'
]],
//新增楼盘与经纪人关系
'delTohouses'
=>
[
'index/broker/delTohouses'
,
[
'method'
=>
'POST'
]],
//解除经纪人和楼盘关系
'delTohouses'
=>
[
'index/broker/delTohouses'
,
[
'method'
=>
'POST'
]],
//解除经纪人和楼盘关系
'getAgentsTohouses'
=>
[
'index/broker/getAgentsTohouses'
,
[
'method'
=>
'GET'
]],
//获取经纪人和楼盘关系信息
//版本管理
//版本管理
'version'
=>
[
'index/version/index'
,[
'method'
=>
'get'
]],
'version'
=>
[
'index/version/index'
,[
'method'
=>
'get'
]],
...
...
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