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
d3843249
Commit
d3843249
authored
Nov 23, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
详情页显示对内地址控制
parent
90fa505d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
1 deletion
+65
-1
Shop.php
application/api_broker/controller/Shop.php
+62
-1
OReportModel.php
application/model/OReportModel.php
+3
-0
No files found.
application/api_broker/controller/Shop.php
View file @
d3843249
...
...
@@ -18,6 +18,7 @@ use app\model\GHousesImgs;
use
app\model\GHousesToAgents
;
use
app\model\GLandlordPhone
;
use
app\model\OBargainModel
;
use
app\model\OReportModel
;
use
app\model\Regions
;
use
think\Log
;
...
...
@@ -502,6 +503,7 @@ class Shop extends Basic
$panPartyArr
=
$verify
->
getPanpartyAgentsByHouseId
(
$params
[
"id"
]);
$result
[
"panParty"
]
=
$panPartyArr
;
$house_agent_data
=
[];
// 计数开始
if
(
$params
[
"site_area"
]
==
3
||
$params
[
"site_area"
]
==
4
&&
$result
)
{
...
...
@@ -522,17 +524,20 @@ class Shop extends Basic
$result
[
'upload_user'
]
=
$upload_data
[
0
][
'name'
]
.
'-'
.
$upload_data
[
0
][
'phone'
];
//独家方
if
(
$result
[
'is_exclusive_type'
]
==
1
)
{
$m_house_agent
=
new
GHousesToAgents
();
$where_house
[
'is_del'
]
=
0
;
$where_house
[
'type'
]
=
3
;
$where_house
[
'houses_id'
]
=
$result
[
'id'
];
$house_agent_data
=
$m_house_agent
->
getAgentsByHouseId
(
'
name,
phone'
,
$where_house
);
$house_agent_data
=
$m_house_agent
->
getAgentsByHouseId
(
'
b.id,b.name,b.
phone'
,
$where_house
);
$result
[
'exclusive_user'
]
=
$house_agent_data
[
0
][
'name'
];
$result
[
'exclusive_phone'
]
=
$house_agent_data
[
0
][
'phone'
];
}
}
//是否被收藏
$result
[
"is_collect"
]
=
2
;
if
(
$params
[
'site_area'
]
==
3
)
{
...
...
@@ -553,12 +558,63 @@ class Shop extends Basic
if
(
$is_bool
){
$result
[
'is_can_edit'
]
=
0
;
}
$is_show_address
=
$this
->
isLookAddress
(
$panPartyArr
,
$house_agent_data
,
$params
[
"id"
]);
if
(
!
$is_show_address
){
$result
[
'address'
]
=
$result
[
'external_address'
];
}
$result
[
'new_sign_rule'
]
=
"付
{
$result
[
'payment_month'
]
}
押
{
$result
[
'deposit_month'
]
}
,签订
{
$result
[
'age_limit'
]
}
年"
;
$result
[
'payment_deposit'
]
=
empty
(
$result
[
'payment_month'
])
?
""
:
"付
{
$result
[
'payment_month'
]
}
押
{
$result
[
'deposit_month'
]
}
"
;
$result
[
'age_limit'
]
=
empty
(
$result
[
'age_limit'
])
?
""
:
"签订
{
$result
[
'age_limit'
]
}
年"
;
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
}
/**
* 是否显示对内地址
* @param $panPartyArr
* @param $house_agent_data
* @param $house_id
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
private
function
isLookAddress
(
$panPartyArr
,
$house_agent_data
,
$house_id
){
$vip_services
=
new
VipService
();
$is_can
=
$vip_services
->
vip
(
$this
->
agentId
,
'is_show_address'
);
if
(
$is_can
==
0
){
return
true
;
}
foreach
(
$panPartyArr
as
$item
){
if
(
$this
->
agentId
==
$item
[
"id"
]){
return
true
;
}
}
if
(
!
empty
(
$house_agent_data
)){
foreach
(
$house_agent_data
as
$value
){
if
(
$this
->
agentId
==
$value
[
"id"
]){
return
true
;
}
}
}
//根据经纪人id和楼盘查询是否30天有报备
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
'-30day'
));
$start_time
=
date
(
"Y-m-d H:i:s"
,
time
());
$reportModel
=
new
OReportModel
();
$params
[
"report_agent_id"
]
=
$this
->
agentId
;
$params
[
"house_id"
]
=
$house_id
;
$params
[
"create_time"
]
=
array
(
"between"
,
array
(
$start_time
,
$end_time
));
$reportList
=
$reportModel
->
selectReportByUserId
(
"a.id"
,
$params
);
if
(
count
(
$reportList
)
>
0
){
return
true
;
}
return
false
;
}
/**
* 判断是否是此楼盘盘方的店长
* @param $panPartyArr
...
...
@@ -847,4 +903,9 @@ class Shop extends Basic
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
private
function
getBusinessDistrictNameById
(
$businessDistrictId
){
$model
=
new
GBusinessDistrict
();
$params
[
"id"
]
=
$businessDistrictId
;
return
$model
->
getValue
(
$params
,
"name"
);
}
}
application/model/OReportModel.php
View file @
d3843249
...
...
@@ -147,6 +147,9 @@ class OReportModel extends Model
if
(
isset
(
$params
[
"house_id"
]))
{
$where_
[
"b.house_id"
]
=
$params
[
"house_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
$where_
[
"a.status"
]
=
0
;
return
$this
->
db
...
...
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