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
90c49114
Commit
90c49114
authored
Apr 04, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug我的盘方
parent
2eb26475
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
3 deletions
+40
-3
Shop.php
application/api_broker/controller/Shop.php
+8
-2
VerifyService.php
application/api_broker/service/VerifyService.php
+32
-1
No files found.
application/api_broker/controller/Shop.php
View file @
90c49114
...
...
@@ -3,6 +3,7 @@
namespace
app\api_broker\controller
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\VerifyService
;
use
app\model\AttentionModel
;
use
app\model\GHouses
;
use
app\model\GHousesImgs
;
...
...
@@ -110,8 +111,12 @@ class Shop extends Basic
$conditions
[
'shop_type'
]
=
array
(
"eq"
,
$params
[
'shop_type'
]
);
}
//我的商铺 代表我是盘方的商铺
if
(
isset
(
$params
[
'agent_id'
])){
$conditions
[
'upload_id'
]
=
array
(
"eq"
,
$params
[
'agent_id'
]
);
$verifyService
=
new
VerifyService
();
$ids
=
$verifyService
->
getPanpartyByAgentId
(
$params
[
'agent_id'
]);
//$conditions['upload_id'] = array( "eq", $params['agent_id'] );
$conditions
[
'id'
]
=
array
(
"in"
,
$ids
);
}
$area_start
=
isset
(
$params
[
'shop_area_start'
])
?
$params
[
'shop_area_start'
]
:
-
1
;
...
...
@@ -153,7 +158,8 @@ class Shop extends Basic
$conditions
[
'is_show'
]
=
array
(
'eq'
,
0
);
//c端只显示可显示的楼盘
}
if
(
isset
(
$conditions
[
'upload_id'
])){
//如果有传经纪人id则代表我的商铺不区分状态
if
(
isset
(
$params
[
'agent_id'
])){
unset
(
$conditions
[
'status'
]);
}
$result
=
$this
->
gHousesModel
->
getHousesList
(
$pageNo
,
$pageSize
,
$order_
,
$field
,
$conditions
,
$spTagArr
);
...
...
application/api_broker/service/VerifyService.php
View file @
90c49114
...
...
@@ -56,9 +56,14 @@ class VerifyService
return
null
;
}
/**
* 获取我的案场权限人
* @param $agent_id
* @return false|null|\PDOStatement|string|\think\Collection
*/
public
function
getCaseHouseIdByAgentId
(
$agent_id
)
{
$houseToAgentModel
=
new
GHousesToAgents
();
$houseToAgentModel
=
new
GHousesToAgents
();
$params
[
"a.agents_id"
]
=
$agent_id
;
$params
[
"a.type"
]
=
1
;
//案场权限人
$params
[
"a.is_del"
]
=
0
;
...
...
@@ -71,4 +76,29 @@ class VerifyService
return
null
;
}
/**
* 获取我的盘方
* @param $agent_id
* @return false|null|\PDOStatement|string|\think\Collection
*/
public
function
getPanpartyByAgentId
(
$agent_id
)
{
$houseToAgentModel
=
new
GHousesToAgents
();
$params
[
"a.agents_id"
]
=
$agent_id
;
$params
[
"a.type"
]
=
2
;
$params
[
"a.is_del"
]
=
0
;
$house_arr
=
$houseToAgentModel
->
getHouseByAgentId
(
"a.houses_id,b.internal_title"
,
$params
);
$ids
=
""
;
if
(
count
(
$house_arr
)
>
0
)
{
foreach
(
$house_arr
as
$item
)
{
$ids
.=
$item
[
"houses_id"
]
.
","
;
}
$ids
=
rtrim
(
$ids
,
","
);
return
$ids
;
}
return
null
;
}
}
\ No newline at end of file
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