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
6d40c4da
Commit
6d40c4da
authored
Sep 18, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取经纪人和楼盘关系信息
parent
053f8bd5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
Broker.php
application/index/controller/Broker.php
+11
-7
GHousesToAgents.php
application/model/GHousesToAgents.php
+9
-5
route.php
application/route.php
+2
-2
No files found.
application/index/controller/Broker.php
View file @
6d40c4da
...
@@ -175,7 +175,7 @@ class Broker extends Basic
...
@@ -175,7 +175,7 @@ class Broker extends Basic
*
*
* @return \think\Response
* @return \think\Response
*/
*/
public
function
delTo
h
ouses
()
{
public
function
delTo
H
ouses
()
{
$data
[
'status'
]
=
200
;
$data
[
'status'
]
=
200
;
$data
[
'data'
]
=
''
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
...
@@ -194,11 +194,8 @@ class Broker extends Basic
...
@@ -194,11 +194,8 @@ class Broker extends Basic
* 获取经纪人和楼盘关系信息
* 获取经纪人和楼盘关系信息
*
*
* @return \think\Response
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
getAgentsTo
h
ouses
()
{
public
function
getAgentsTo
H
ouses
()
{
$data
[
'status'
]
=
200
;
$data
[
'status'
]
=
200
;
$data
[
'data'
]
=
''
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
...
@@ -206,13 +203,20 @@ class Broker extends Basic
...
@@ -206,13 +203,20 @@ class Broker extends Basic
if
(
$this
->
params
[
'houses_id'
])
{
if
(
$this
->
params
[
'houses_id'
])
{
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$hg
=
new
GHousesToAgents
();
$fields
=
'b.id,b.name,b.phone'
;
$fields
=
'b.id,b.name,b.phone'
;
$where
[
'a.is_del'
]
=
[
'='
,
0
];
$where
[
'a.is_del'
]
=
[
'='
,
0
];
$where
[
'b.status'
]
=
[
'='
,
0
];
$where
[
'b.status'
]
=
[
'='
,
0
];
if
(
!
empty
(
$this
->
params
[
'type'
]))
{
$where
[
'a.type'
]
=
$this
->
params
[
'type'
];
$where
[
'a.type'
]
=
$this
->
params
[
'type'
];
}
if
(
!
empty
(
$this
->
params
[
'houses_id'
]))
{
$where
[
'a.houses_id'
]
=
$this
->
params
[
'houses_id'
];
$where
[
'a.houses_id'
]
=
$this
->
params
[
'houses_id'
];
$data
[
'data'
]
=
$hg
->
getAgentsHousesList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$fields
,
$where
);
}
$m_house
=
new
GHousesToAgents
();
$data
[
'data'
]
=
$m_house
->
getAgentsHousesList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$fields
,
$where
);
}
else
{
}
else
{
$data
[
'status'
]
=
101
;
$data
[
'status'
]
=
101
;
$data
[
'msg'
]
=
'houses_id is null'
;
$data
[
'msg'
]
=
'houses_id is null'
;
...
...
application/model/GHousesToAgents.php
View file @
6d40c4da
...
@@ -202,14 +202,12 @@ class GHousesToAgents extends BaseModel
...
@@ -202,14 +202,12 @@ class GHousesToAgents extends BaseModel
* @param string $order_
* @param string $order_
* @param string $field
* @param string $field
* @param string $params
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
getAgentsHousesList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
public
function
getAgentsHousesList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
{
return
$this
->
field
(
$field
)
try
{
$result
[
'data'
]
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agents_id = b.id'
,
'left'
)
->
join
(
'a_agents b'
,
'a.agents_id = b.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
...
@@ -217,6 +215,12 @@ class GHousesToAgents extends BaseModel
...
@@ -217,6 +215,12 @@ class GHousesToAgents extends BaseModel
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
select
();
->
select
();
$result
[
'status'
]
=
'successful'
;
}
catch
(
\Exception
$e
)
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
$e
->
getMessage
();
}
return
$result
;
}
}
/**
/**
...
...
application/route.php
View file @
6d40c4da
...
@@ -104,8 +104,8 @@ Route::group('index', [
...
@@ -104,8 +104,8 @@ Route::group('index', [
'getBrokerList'
=>
[
'index/broker/getBrokerList'
,
[
'method'
=>
'get'
]
],
//门店列表的经纪人
'getBrokerList'
=>
[
'index/broker/getBrokerList'
,
[
'method'
=>
'get'
]
],
//门店列表的经纪人
'addHousesAgents'
=>
[
'index/broker/AddHousesAgents'
,
[
'method'
=>
'POST'
]
],
//新增楼盘与经纪人关系(案场权限人)
'addHousesAgents'
=>
[
'index/broker/AddHousesAgents'
,
[
'method'
=>
'POST'
]
],
//新增楼盘与经纪人关系(案场权限人)
'addHousesAgentsDish'
=>
[
'index/broker/AddHousesAgents'
,
[
'method'
=>
'POST'
]
],
//新增楼盘与经纪人关系(盘方)
'addHousesAgentsDish'
=>
[
'index/broker/AddHousesAgents'
,
[
'method'
=>
'POST'
]
],
//新增楼盘与经纪人关系(盘方)
'delTohouses'
=>
[
'index/broker/delTo
h
ouses'
,
[
'method'
=>
'POST'
]
],
//解除经纪人和楼盘关系
'delTohouses'
=>
[
'index/broker/delTo
H
ouses'
,
[
'method'
=>
'POST'
]
],
//解除经纪人和楼盘关系
'getAgentsTohouses'
=>
[
'index/broker/getAgentsTo
h
ouses'
,
[
'method'
=>
'GET'
]
],
//获取经纪人和楼盘关系信息
'getAgentsTohouses'
=>
[
'index/broker/getAgentsTo
H
ouses'
,
[
'method'
=>
'GET'
]
],
//获取经纪人和楼盘关系信息
'getAgentDistrictStore'
=>
[
'index/broker/getAgentDistrictStore'
,
[
'method'
=>
'GET'
]
],
//获取经纪人id获取部门门店名称
'getAgentDistrictStore'
=>
[
'index/broker/getAgentDistrictStore'
,
[
'method'
=>
'GET'
]
],
//获取经纪人id获取部门门店名称
'getCurrentCity'
=>
[
'index/broker/getCurrentCity'
,
[
'method'
=>
'GET'
]
],
//获取所属城市
'getCurrentCity'
=>
[
'index/broker/getCurrentCity'
,
[
'method'
=>
'GET'
]
],
//获取所属城市
'settingCity'
=>
[
'index/broker/settingCity'
,
[
'method'
=>
'POST'
]
],
//设置所属城市
'settingCity'
=>
[
'index/broker/settingCity'
,
[
'method'
=>
'POST'
]
],
//设置所属城市
...
...
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