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
986e8741
Commit
986e8741
authored
Nov 13, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义价格搜索
parent
a7f10733
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
16 deletions
+31
-16
Houses.php
application/index/controller/Houses.php
+31
-16
No files found.
application/index/controller/Houses.php
View file @
986e8741
...
...
@@ -246,19 +246,37 @@ class Houses extends Basic
$where
[
'status'
]
=
$this
->
params
[
'status'
];
}
/*价格 -1表示营业额扣点 存分*/
if
(
$this
->
params
[
'rent_price'
]
!=
NULL
&&
$this
->
params
[
'rent_price'
]
!=
-
1
)
{
// /*价格 -1表示营业额扣点 存分*/
// if ($this->params['rent_price'] != NULL && $this->params['rent_price'] != -1) {
// $where['rent_type'] = 1;
// switch ($this->params['rent_price']) {
// case 1:
// $where['rent_price'] = [ '<=', 1000000 ];
// break;
// case 2:
// $where['rent_price'] = [ 'between', '1000000,3000000' ];
// break;
// default :
// $where['rent_price'] = [ '>', '3000000' ];
// }
// }
if
(
!
empty
(
$this
->
params
[
'rent_price'
])
&&
$this
->
params
[
'rent_price'
]
==
-
1
)
{
$where
[
'rent_type'
]
=
-
1
;
}
if
(
!
empty
(
$this
->
params
[
'price_start'
])
&&
empty
(
$this
->
params
[
'price_end'
]))
{
$where
[
'rent_type'
]
=
1
;
switch
(
$this
->
params
[
'rent_price'
])
{
case
1
:
$where
[
'rent_price'
]
=
[
'<='
,
1000000
];
break
;
case
2
:
$where
[
'rent_price'
]
=
[
'between'
,
'1000000,3000000'
];
break
;
default
:
$where
[
'rent_price'
]
=
[
'>'
,
'3000000'
];
}
$where
[
'rent_price'
]
=
[
'>='
,
$this
->
params
[
'price_start'
]
*
100
];
}
if
(
empty
(
$this
->
params
[
'price_start'
])
&&
!
empty
(
$this
->
params
[
'price_end'
]))
{
$where
[
'rent_type'
]
=
1
;
$where
[
'rent_price'
]
=
[
'<='
,
$this
->
params
[
'price_end'
]
*
100
];
}
if
(
!
empty
(
$this
->
params
[
'price_start'
])
&&
!
empty
(
$this
->
params
[
'price_end'
]))
{
$where
[
'rent_type'
]
=
1
;
$where
[
'rent_price'
]
=
[
'between'
,
[
$this
->
params
[
'price_start'
],
$this
->
params
[
'price_end'
]]
];
}
/*对内楼盘名*/
...
...
@@ -405,17 +423,14 @@ class Houses extends Basic
}
if
(
!
empty
(
$this
->
params
[
'area_start'
])
&&
empty
(
$this
->
params
[
'area_end'
]))
{
$where
[
'rent_type'
]
=
1
;
$where
[
'shop_area_start'
]
=
[
'>='
,
$this
->
params
[
'area_start'
]];
}
if
(
!
empty
(
$this
->
params
[
'area_end'
])
&&
empty
(
$this
->
params
[
'area_start'
]))
{
$where
[
'rent_type'
]
=
1
;
if
(
!
empty
(
$this
->
params
[
'area_end'
])
&&
empty
(
$this
->
params
[
'area_start'
]))
{
$where
[
'shop_area_start'
]
=
[
'<='
,
$this
->
params
[
'area_end'
]];
}
if
(
!
empty
(
$this
->
params
[
'area_end'
])
&&
!
empty
(
$this
->
params
[
'area_start'
]))
{
$where
[
'rent_type'
]
=
1
;
$where
[
'shop_area_start'
]
=
[
'between'
,
[
$this
->
params
[
'area_start'
],
$this
->
params
[
'area_end'
]]];
}
...
...
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