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
169a0205
Commit
169a0205
authored
Jun 11, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段修改
parent
eda11ce2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
OfficeCollectHouse.php
application/api_broker/controller/OfficeCollectHouse.php
+21
-12
No files found.
application/api_broker/controller/OfficeCollectHouse.php
View file @
169a0205
...
@@ -11,6 +11,7 @@ namespace app\api_broker\controller;
...
@@ -11,6 +11,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\LookShopService
;
use
app\api_broker\service\LookShopService
;
use
app\api_broker\service\VipService
;
use
app\api_broker\service\VipService
;
use
app\model\GBusinessDistrict
;
use
app\model\GHousesToAgents
;
use
app\model\GHousesToAgents
;
use
app\model\OfficeACollectHouse
;
use
app\model\OfficeACollectHouse
;
use
app\model\OfficeGRoom
;
use
app\model\OfficeGRoom
;
...
@@ -121,7 +122,8 @@ class OfficeCollectHouse extends Basic
...
@@ -121,7 +122,8 @@ class OfficeCollectHouse extends Basic
$field
.=
'Houses.station_end,'
;
$field
.=
'Houses.station_end,'
;
$field
.=
'Houses.floor,'
;
$field
.=
'Houses.floor,'
;
$field
.=
'building.type,'
;
$field
.=
'building.type,'
;
// $field .= 'Houses.is_vip,';
$field
.=
'Houses.floor_tag,'
;
$field
.=
'Houses.is_lock,'
;
$field
.=
'Houses.is_exclusive_type,'
;
$field
.=
'Houses.is_exclusive_type,'
;
$field
.=
'CollectUser.create_time'
;
$field
.=
'CollectUser.create_time'
;
// $field .= 'building.disc';
// $field .= 'building.disc';
...
@@ -131,7 +133,9 @@ class OfficeCollectHouse extends Basic
...
@@ -131,7 +133,9 @@ class OfficeCollectHouse extends Basic
$res
=
$this
->
aCollectHouse
->
getCollectList
(
$pageNo
,
$pageSize
,
$field
,
$get_params
);
$res
=
$this
->
aCollectHouse
->
getCollectList
(
$pageNo
,
$pageSize
,
$field
,
$get_params
);
$res_total
=
$this
->
aCollectHouse
->
getCollectListTotal
(
$field
,
$get_params
);
$res_total
=
$this
->
aCollectHouse
->
getCollectListTotal
(
$field
,
$get_params
);
$look_shop_service
=
new
LookShopService
();
$look_shop_service
=
new
LookShopService
();
$m_agent
=
new
OfficeGRoomToAgent
();
$vip
=
new
VipService
();
$business
=
new
GBusinessDistrict
();
foreach
(
$res
as
$key
=>
$val
)
{
foreach
(
$res
as
$key
=>
$val
)
{
$isLook
=
$look_shop_service
->
isLooked
(
$params
[
"agents_id"
],
$val
[
"id"
]);
$isLook
=
$look_shop_service
->
isLooked
(
$params
[
"agents_id"
],
$val
[
"id"
]);
$res
[
$key
][
"is_look"
]
=
$isLook
;
$res
[
$key
][
"is_look"
]
=
$isLook
;
...
@@ -140,25 +144,30 @@ class OfficeCollectHouse extends Basic
...
@@ -140,25 +144,30 @@ class OfficeCollectHouse extends Basic
//锁盘后,盘方、独家方、有权限的可以查看
//锁盘后,盘方、独家方、有权限的可以查看
$res
[
$key
][
"look_lock"
]
=
0
;
$res
[
$key
][
"look_lock"
]
=
0
;
if
(
isset
(
$val
[
'is_lock'
])
&&
$val
[
'is_lock'
]
==
1
)
{
if
(
isset
(
$val
[
'is_lock'
])
&&
$val
[
'is_lock'
]
==
1
)
{
$vip
=
new
VipService
();
if
(
!
$vip
->
vip
(
$this
->
agentId
,
'index/lockOffice'
))
{
if
(
!
$vip
->
vip
(
$this
->
agentId
,
'index/lockHouse'
))
{
$res
[
$key
][
"look_lock"
]
=
1
;
$res
[
$key
][
"look_lock"
]
=
1
;
}
}
}
$m_agent
=
new
OfficeGRoomToAgent
();
$agent_where
[
'a.agent_id'
]
=
$this
->
agentId
;
$agent_where
[
'a.agent_id'
]
=
$this
->
agentId
;
// $agent_where['a.type'] = ['in', '2,3'];
$agent_where
[
'a.type'
]
=
[
'in'
,
'2,3'
];
$agent_where
[
'a.type'
]
=
2
;
$agent_where
[
'a.house_id'
]
=
$val
[
'id'
];
$agent_where
[
'a.house_id'
]
=
$val
[
'id'
];
$agent_where
[
'a.is_del'
]
=
0
;
$agent_data
=
$m_agent
->
getAgentsByRoomId
(
'a.id,a.type,b.name,b.phone'
,
$agent_where
);
$agent_data
=
$m_agent
->
getAgentsHouseField
(
'a.id'
,
$agent_where
);
$res
[
$key
][
"name"
]
=
''
;
if
(
$agent_data
)
{
foreach
(
$agent_data
as
$vvv
)
{
if
(
$vvv
>
0
)
{
$res
[
$key
][
"look_lock"
]
=
1
;
$res
[
$key
][
"look_lock"
]
=
1
;
foreach
(
$agent_data
as
$vvv
)
{
if
(
$vvv
[
'type'
]
==
2
)
{
$res
[
$key
][
"name"
]
=
$vvv
[
'name'
]
.
'-'
.
$vvv
[
'phone'
];
}
}
}
}
}
}
if
(
!
empty
(
$val
[
'business_district_id'
]))
{
$res
[
$key
][
'business_name'
]
=
$business
->
getFieldOneValue
(
'name'
,[
'id'
=>
$val
[
'business_district_id'
]]);
}
else
{
$res
[
$key
][
'business_name'
]
=
''
;
}
}
}
//这里为了将APP跟后台区分开来,pc后台需要total,app不需要
//这里为了将APP跟后台区分开来,pc后台需要total,app不需要
...
...
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