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
9af87024
Commit
9af87024
authored
Jul 17, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺地址搜索
parent
23b898df
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
Houses.php
application/index/controller/Houses.php
+20
-15
GHouses.php
application/model/GHouses.php
+1
-0
No files found.
application/index/controller/Houses.php
View file @
9af87024
...
...
@@ -116,57 +116,62 @@ class Houses extends Basic
/*精选商铺--0是1否*/
if
(
$this
->
params
[
'is_carefully_chosen'
]
!=
-
1
)
{
$where
[
'is_carefully_chosen'
]
=
$this
->
params
[
'is_carefully_chosen'
];
$where
[
'
a.
is_carefully_chosen'
]
=
$this
->
params
[
'is_carefully_chosen'
];
}
/*0是1否显示在c端用户*/
if
(
$this
->
params
[
'is_show'
]
!=
-
1
)
{
$where
[
'is_show'
]
=
$this
->
params
[
'is_show'
];
$where
[
'
a.
is_show'
]
=
$this
->
params
[
'is_show'
];
}
/*商铺类型(0商场,1街铺)*/
if
(
$this
->
params
[
'shop_type'
]
!=
-
1
)
{
$where
[
'shop_type'
]
=
$this
->
params
[
'shop_type'
];
$where
[
'
a.
shop_type'
]
=
$this
->
params
[
'shop_type'
];
}
/*所在城市*/
if
(
!
empty
(
$this
->
params
[
'city'
]))
{
$where
[
'city'
]
=
$this
->
params
[
'city'
];
$where
[
'
a.
city'
]
=
$this
->
params
[
'city'
];
}
/*所在区*/
if
(
!
empty
(
$this
->
params
[
'disc'
]))
{
$where
[
'disc'
]
=
$this
->
params
[
'disc'
];
$where
[
'
a.
disc'
]
=
$this
->
params
[
'disc'
];
}
/*状态 0待审批 1上架 2下架 3回收*/
if
(
!
empty
(
$this
->
params
[
'status'
]))
{
$where
[
'status'
]
=
$this
->
params
[
'status'
];
$where
[
'
a.
status'
]
=
$this
->
params
[
'status'
];
}
/*价格 -1表示营业额扣点 存分*/
if
(
$this
->
params
[
'rent_price'
]
!=
NULL
&&
$this
->
params
[
'rent_price'
]
!=
-
1
)
{
$where
[
'rent_type'
]
=
1
;
$where
[
'
a.
rent_type'
]
=
1
;
switch
(
$this
->
params
[
'rent_price'
])
{
case
1
:
$where
[
'rent_price'
]
=
[
'<='
,
1000000
];
$where
[
'
a.
rent_price'
]
=
[
'<='
,
1000000
];
break
;
case
2
:
$where
[
'rent_price'
]
=
[
'between'
,
'1000000,3000000'
];
$where
[
'
a.
rent_price'
]
=
[
'between'
,
'1000000,3000000'
];
break
;
default
:
$where
[
'rent_price'
]
=
[
'>'
,
'3000000'
];
$where
[
'
a.
rent_price'
]
=
[
'>'
,
'3000000'
];
}
}
/*对内楼盘名*/
if
(
$this
->
params
[
'internal_title'
]
!=
NULL
)
{
$where
[
'internal_title'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'internal_title'
]
.
'%'
];
$where
[
'a.internal_title'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'internal_title'
]
.
'%'
];
}
/*楼盘地址搜索*/
if
(
$this
->
params
[
'internal_address'
]
!=
NULL
)
{
$where
[
'a.internal_address'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'internal_address'
]
.
'%'
];
}
/*是否独家0否1是*/
if
(
$this
->
params
[
'is_exclusive_type'
]
!=
-
1
)
{
$where
[
'is_exclusive_type'
]
=
$this
->
params
[
'is_exclusive_type'
];
$where
[
'
a.
is_exclusive_type'
]
=
$this
->
params
[
'is_exclusive_type'
];
}
/*开始时间*/
...
...
@@ -187,15 +192,15 @@ class Houses extends Basic
/*根据库存判断是否已租*/
if
(
$this
->
params
[
'leased'
]
!=
-
1
)
{
if
(
$this
->
params
[
'leased'
]
==
0
)
{
$where
[
'residue_num'
]
=
0
;
$where
[
'
a.
residue_num'
]
=
0
;
}
else
{
$where
[
'residue_num'
]
=
[
'<>'
,
0
];
$where
[
'
a.
residue_num'
]
=
[
'<>'
,
0
];
}
}
/*业态*/
if
(
$this
->
params
[
'industry_type'
]
!=
NULL
)
{
$where
[
'industry_type'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'industry_type'
]
.
'%'
];
$where
[
'
a.
industry_type'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'industry_type'
]
.
'%'
];
}
$fields
=
'a.id,a.shop_type,a.internal_title,a.rent_price,a.is_show,a.create_time,a.residue_num,a.rent_type,
...
...
application/model/GHouses.php
View file @
9af87024
...
...
@@ -268,6 +268,7 @@ class GHouses extends BaseModel
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
group
(
'a.id'
)
->
select
();
$house_id
=
array
();
...
...
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