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
cfe4eeb1
Commit
cfe4eeb1
authored
Jun 26, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e94beade
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
1 deletion
+40
-1
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+40
-1
No files found.
application/index/service/OfficeRoomService.php
View file @
cfe4eeb1
...
...
@@ -1203,10 +1203,15 @@ class OfficeRoomService
if
(
isset
(
$params
[
'disc'
]))
{
$where
[
'b.disc'
]
=
$params
[
'disc'
];
//区
}
if
(
isset
(
$params
[
'id'
]))
{
$where
[
'a.id'
]
=
$params
[
'id'
];
//楼盘id
}
if
(
isset
(
$params
[
'title'
]))
{
$where
[
'b.title'
]
=
[
'LIKE'
,
'%'
.
$params
[
'title'
]
.
'%'
];
//楼盘名
}
if
(
isset
(
$params
[
'address'
]))
{
$where
[
'b.address'
]
=
[
'LIKE'
,
'%'
.
$params
[
'address'
]
.
'%'
];
//楼盘地址
}
if
(
isset
(
$params
[
'id'
]))
{
$where
[
'a.id'
]
=
$params
[
'id'
];
...
...
@@ -1280,6 +1285,17 @@ class OfficeRoomService
}
}
if
(
isset
(
$params
[
'landlord_phone'
])){
$ids
=
$this
->
getBuildingByLandlordPhone
(
$params
[
'landlord_phone'
]);
if
(
$ids
){
$where
[
'a.id'
]
=
array
(
"in"
,
$ids
);
//房东手机号 office_g_landlord_phone
}
else
{
$result
[
'status'
]
=
'successful'
;
$result
[
'msg'
]
=
"request null"
;
return
$result
;
}
}
$field
=
'a.id,b.disc,b.title,b.address,c.name as business_name,a.building_id,a.price,a.price_total,b.status,a.is_rent'
;
try
{
$data
=
$this
->
m_office_room
->
getRoomBuilding
(
$page_no
,
$page_size
,
$order
,
$field
,
$where
);
...
...
@@ -1329,6 +1345,29 @@ class OfficeRoomService
return
$ids
;
}
/**
* 根据房东手机号搜索
* @param $landlordPhone
* @return string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
private
function
getBuildingByLandlordPhone
(
$landlordPhone
){
$landlordPhoneModel
=
new
OfficeGLandlordPhone
();
$field
=
"house_id"
;
$params
[
"phone"
]
=
array
(
"like"
,
"%"
.
trim
(
$landlordPhone
)
.
"%"
);
$roomArr
=
$landlordPhoneModel
->
getAllList
(
$field
,
$params
);
$ids
=
""
;
if
(
count
(
$roomArr
)
>
0
)
{
foreach
(
$roomArr
as
$item
)
{
$ids
.=
$item
[
"id"
]
.
","
;
}
$ids
=
rtrim
(
$ids
,
","
);
}
return
$ids
;
}
/**
* 标签处理
*
...
...
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