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
b0a8e010
Commit
b0a8e010
authored
Jun 05, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段修改
parent
9e1025b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+19
-19
No files found.
application/index/service/OfficeRoomService.php
View file @
b0a8e010
...
...
@@ -1146,18 +1146,18 @@ class OfficeRoomService
$page_no
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$page_size
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$where
=
[];
$order
=
'
b
.id desc'
;
$order
=
'
a
.id desc'
;
if
(
isset
(
$params
[
'city'
]))
{
$where
[
'b.city'
]
=
$params
[
'city'
];
//市
}
if
(
isset
(
$params
[
'disc'
]))
{
$where
[
'
a
.disc'
]
=
$params
[
'disc'
];
//区
$where
[
'
b
.disc'
]
=
$params
[
'disc'
];
//区
}
if
(
isset
(
$params
[
'title'
]))
{
$where
[
'
a
.title'
]
=
[
'LIKE'
,
'%'
.
$params
[
'title'
]
.
'%'
];
//楼盘名
$where
[
'
b
.title'
]
=
[
'LIKE'
,
'%'
.
$params
[
'title'
]
.
'%'
];
//楼盘名
}
if
(
isset
(
$params
[
'id'
]))
{
...
...
@@ -1165,48 +1165,48 @@ class OfficeRoomService
}
if
(
isset
(
$params
[
'`business_district_id`'
]))
{
$where
[
'
a
.business_district_id'
]
=
$params
[
'business_district_id'
];
//商圈id
$where
[
'
b
.business_district_id'
]
=
$params
[
'business_district_id'
];
//商圈id
}
if
(
isset
(
$params
[
'area_start'
]))
{
$where
[
'
b
.area'
]
=
[
'>'
,
$params
[
'area_start'
]];
//面积
$where
[
'
a
.area'
]
=
[
'>'
,
$params
[
'area_start'
]];
//面积
}
if
(
isset
(
$params
[
'area_end'
]))
{
$where
[
'
b
.area'
]
=
[
'<'
,
$params
[
'area_end'
]];
//面积
$where
[
'
a
.area'
]
=
[
'<'
,
$params
[
'area_end'
]];
//面积
}
if
(
isset
(
$params
[
'area_start'
])
&&
$params
[
'area_end'
])
{
$where
[
'
b
.area'
]
=
[
'between'
,
[
$params
[
'area_start'
],
$params
[
'area_end'
]]];
//面积
$where
[
'
a
.area'
]
=
[
'between'
,
[
$params
[
'area_start'
],
$params
[
'area_end'
]]];
//面积
}
if
(
isset
(
$params
[
'type'
]))
{
$where
[
'
a
.type'
]
=
$params
[
'type'
];
//1.写字楼 2商住两用 3园区 4.洋房 5联合办公 6厂房
$where
[
'
b
.type'
]
=
$params
[
'type'
];
//1.写字楼 2商住两用 3园区 4.洋房 5联合办公 6厂房
}
if
(
isset
(
$params
[
'price_start'
]))
{
$where
[
'
b
.price'
]
=
$params
[
'price_start'
]
*
100
;
//租金单价
$where
[
'
a
.price'
]
=
$params
[
'price_start'
]
*
100
;
//租金单价
}
if
(
isset
(
$params
[
'price_end'
]))
{
$where
[
'
b
.price'
]
=
$params
[
'price_end'
]
*
100
;
//租金单价
$where
[
'
a
.price'
]
=
$params
[
'price_end'
]
*
100
;
//租金单价
}
if
(
isset
(
$params
[
'price_start'
])
&&
isset
(
$params
[
'price_end'
]))
{
$where
[
'
b
.price'
]
=
[
'between'
,
[
$params
[
'price_start'
]
*
100
,
$params
[
'price_end'
]
*
100
]];
//租金单价
$where
[
'
a
.price'
]
=
[
'between'
,
[
$params
[
'price_start'
]
*
100
,
$params
[
'price_end'
]
*
100
]];
//租金单价
}
if
(
isset
(
$params
[
'is_exclusive_type'
]))
{
$where
[
'
b
.is_exclusive_type'
]
=
$params
[
'is_exclusive_type'
];
//是否独家0否1是
$where
[
'
a
.is_exclusive_type'
]
=
$params
[
'is_exclusive_type'
];
//是否独家0否1是
}
if
(
isset
(
$params
[
'agent_start_time'
])
&&
$params
[
'agent_end_time'
])
{
$where
[
'
b
.agent_start_time'
]
=
[
'>'
,
$params
[
'agent_start_time'
]];
//独家合同开始时间
$where
[
'
b
.agent_end_time'
]
=
[
'<'
,
$params
[
'agent_end_time'
]];
//独家合同结束时间
$where
[
'
a
.agent_start_time'
]
=
[
'>'
,
$params
[
'agent_start_time'
]];
//独家合同开始时间
$where
[
'
a
.agent_end_time'
]
=
[
'<'
,
$params
[
'agent_end_time'
]];
//独家合同结束时间
}
if
(
isset
(
$params
[
'is_rent'
]))
{
$where
[
'
b
.is_rent'
]
=
$params
[
'is_rent'
];
//是否已租 0未租 1已租
$where
[
'
a
.is_rent'
]
=
$params
[
'is_rent'
];
//是否已租 0未租 1已租
}
if
(
isset
(
$params
[
'status'
]))
{
...
...
@@ -1214,15 +1214,15 @@ class OfficeRoomService
}
if
(
isset
(
$params
[
'shop_sign'
]))
{
$where
[
'
b
.shop_sign'
]
=
[
'like'
,
'%'
.
$params
[
'shop_sign'
]
.
'%'
];
//商铺标签
$where
[
'
a
.shop_sign'
]
=
[
'like'
,
'%'
.
$params
[
'shop_sign'
]
.
'%'
];
//商铺标签
}
if
(
isset
(
$params
[
'is_carefully_chosen'
]))
{
$where
[
'
b
.is_carefully_chosen'
]
=
$params
[
'shop_sign'
];
//精选商铺--0否1是
$order
=
'
b
.home_page_sort desc'
;
$where
[
'
a
.is_carefully_chosen'
]
=
$params
[
'shop_sign'
];
//精选商铺--0否1是
$order
=
'
a
.home_page_sort desc'
;
}
$field
=
'a.id,b.disc,
title,
address,c.name as business_name'
;
$field
=
'a.id,b.disc,
b.title,b.
address,c.name as business_name'
;
try
{
$data
=
$this
->
m_office_room
->
getRoomBuilding
(
$page_no
,
$page_size
,
$order
,
$field
,
$where
);
}
catch
(
\Exception
$e
)
{
...
...
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