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
69944169
Commit
69944169
authored
Apr 24, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺列表修改
parent
e7eb4ffc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
18 deletions
+19
-18
Houses.php
application/index/controller/Houses.php
+19
-17
route.php
application/route.php
+0
-1
No files found.
application/index/controller/Houses.php
View file @
69944169
...
...
@@ -31,10 +31,6 @@ class Houses extends Basic
$this
->
house
=
new
GHouses
();
}
public
function
index
()
{
return
view
(
'houseList'
);
}
/**
* 新增和编辑商铺
*
...
...
@@ -89,6 +85,7 @@ class Houses extends Basic
* @throws \think\exception\DbException
*/
public
function
getHouseList
()
{
if
(
$this
->
request
->
isAjax
())
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
...
...
@@ -131,9 +128,11 @@ class Houses extends Basic
if
(
$this
->
params
[
'rent_price'
]
!=
NULL
)
{
switch
(
$this
->
params
[
'rent_price'
])
{
case
1
:
$where
[
'rent_price'
]
=
[
'>'
,
10000
];
break
;
$where
[
'rent_price'
]
=
[
'>'
,
10000
];
break
;
case
2
:
$where
[
'rent_price'
]
=
[
'between'
,
'10000,30000'
];
break
;
$where
[
'rent_price'
]
=
[
'between'
,
'10000,30000'
];
break
;
default
:
$where
[
'rent_price'
]
=
[
'>'
,
'30000'
];
}
...
...
@@ -141,27 +140,27 @@ class Houses extends Basic
/*对内楼盘名*/
if
(
$this
->
params
[
'internal_title'
]
!=
NULL
)
{
$where
[
'internal_title'
]
=
[
'LIKE'
,
$this
->
params
[
'internal_title'
]
.
'%'
];
$where
[
'internal_title'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'internal_title'
]
.
'%'
];
}
/*是否独家0否1是*/
if
(
$this
->
params
[
'is_exclusive_type'
]
!=
NULL
)
{
$where
[
'is_exclusive_type'
]
=
[
'LIKE'
,
$this
->
params
[
'is_exclusive_type'
]
.
'%
'
];
$where
[
'is_exclusive_type'
]
=
$this
->
params
[
'is_exclusive_type
'
];
}
/*开始时间*/
if
(
$this
->
params
[
'start_date'
]
!=
NULL
)
{
$where
[
'create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_date'
]
.
' 00:00:00'
];
$where
[
'create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_date'
]
.
' 00:00:00'
];
}
/*结束时间*/
if
(
$this
->
params
[
'end_date'
]
!=
NULL
)
{
$where
[
'create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
];
$where
[
'create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
];
}
/*开始结束时间*/
if
(
$this
->
params
[
'start_date'
]
!=
NULL
&&
$this
->
params
[
'end_date'
]
!=
NULL
)
{
$where
[
'create_time'
]
=
[
'between time'
,[
$this
->
params
[
'start_date'
]
.
' 00:00:00'
],
$this
->
params
[
'end_date'
]
.
' 23:59:59'
];
$where
[
'create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'start_date'
]
.
' 00:00:00'
],
$this
->
params
[
'end_date'
]
.
' 23:59:59'
];
}
/*根据库存判断是否已租*/
...
...
@@ -169,13 +168,13 @@ class Houses extends Basic
if
(
$this
->
params
[
'leased'
]
==
0
)
{
$where
[
'residue_num'
]
=
0
;
}
else
{
$where
[
'residue_num'
]
=
[
'<>'
,
0
];
$where
[
'residue_num'
]
=
[
'<>'
,
0
];
}
}
/*业态*/
if
(
$this
->
params
[
'industry_type'
]
!=
NULL
)
{
$where
[
'industry_type'
]
=
[
'LIKE'
,
$this
->
params
[
'industry_type'
]
.
'%'
];
$where
[
'industry_type'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'industry_type'
]
.
'%'
];
}
//案场权限人搜索
...
...
@@ -184,7 +183,7 @@ class Houses extends Basic
if
(
!
empty
(
$params
[
'id'
]))
{
$where
[
'id'
]
=
$params
[
'id'
];
}
$where
[
'status'
]
=
[
'<>'
,
3
];
$where
[
'status'
]
=
[
'<>'
,
3
];
$data
[
'data'
][
'list'
]
=
$this
->
house
->
getHouseList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$fields
,
$where
,
$this
->
userId
);
$data
[
'data'
][
'total'
]
=
$this
->
house
->
getTotal
(
$where
);
}
else
{
...
...
@@ -193,13 +192,16 @@ class Houses extends Basic
if
(
$params
[
'id'
]
!=
NULL
)
{
$where
[
'a.id'
]
=
$params
[
'id'
];
}
$where
[
'a.status'
]
=
[
'<>'
,
3
];
$where
[
'c.name'
]
=
[
'LIKE'
,
$params
[
'dish'
]
.
'%'
];
$where
[
'b.type'
]
=
[
'='
,
1
];
$where
[
'a.status'
]
=
[
'<>'
,
3
];
$where
[
'c.name'
]
=
[
'LIKE'
,
$params
[
'dish'
]
.
'%'
];
$where
[
'b.type'
]
=
[
'='
,
1
];
$data
[
'data'
][
'list'
]
=
$this
->
house
->
getHouseListDish
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
,
$this
->
userId
);
$data
[
'data'
][
'total'
]
=
$this
->
house
->
getHouseListDishTotal
(
$where
);
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
else
{
return
view
(
'houseList'
);
}
}
/**
...
...
application/route.php
View file @
69944169
...
...
@@ -145,7 +145,6 @@ Route::group('index', [
//商铺
'BusinessList'
=>
[
'index/BusinessDistrict/getBusiness'
,
[
'method'
=>
'get'
]],
//获取商铺列表数据
'houseList'
=>
[
'index/Houses/index'
,
[
'method'
=>
'get'
]],
//商铺列表
'houseEdit'
=>
[
'index/Houses/edit'
,
[
'method'
=>
'get|post'
]],
//编辑商铺
'houseDel'
=>
[
'index/Houses/del'
,
[
'method'
=>
'post'
]],
//删除商铺
'regions'
=>
[
'index/BusinessDistrict/regions'
,
[
'method'
=>
'get'
]],
//获取省市区数据
...
...
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