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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
94 deletions
+95
-94
Houses.php
application/index/controller/Houses.php
+95
-93
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,117 +85,123 @@ class Houses extends Basic
* @throws \think\exception\DbException
*/
public
function
getHouseList
()
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
if
(
$this
->
request
->
isAjax
())
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$fields
=
''
;
$fields
=
''
;
/*精选商铺--0是1否*/
if
(
$this
->
params
[
'is_carefully_chosen'
]
!=
NULL
)
{
$where
[
'is_carefully_chosen'
]
=
$this
->
params
[
'is_carefully_chosen'
];
}
/*精选商铺--0是1否*/
if
(
$this
->
params
[
'is_carefully_chosen'
]
!=
NULL
)
{
$where
[
'is_carefully_chosen'
]
=
$this
->
params
[
'is_carefully_chosen'
];
}
/*0是1否显示在c端用户*/
if
(
$this
->
params
[
'is_show'
]
!=
NULL
)
{
$where
[
'is_show'
]
=
$this
->
params
[
'is_show'
];
}
/*0是1否显示在c端用户*/
if
(
$this
->
params
[
'is_show'
]
!=
NULL
)
{
$where
[
'is_show'
]
=
$this
->
params
[
'is_show'
];
}
/*商铺类型(0商场,1街铺)*/
if
(
$this
->
params
[
'shop_type'
]
!=
NULL
)
{
$where
[
'shop_type'
]
=
$this
->
params
[
'shop_type'
];
}
/*商铺类型(0商场,1街铺)*/
if
(
$this
->
params
[
'shop_type'
]
!=
NULL
)
{
$where
[
'shop_type'
]
=
$this
->
params
[
'shop_type'
];
}
/*所在城市*/
if
(
!
empty
(
$this
->
params
[
'city'
]))
{
$where
[
'city'
]
=
$this
->
params
[
'city'
];
}
/*所在城市*/
if
(
!
empty
(
$this
->
params
[
'city'
]))
{
$where
[
'city'
]
=
$this
->
params
[
'city'
];
}
/*所在区*/
if
(
!
empty
(
$this
->
params
[
'disc'
]))
{
$where
[
'disc'
]
=
$this
->
params
[
'disc'
];
}
/*所在区*/
if
(
!
empty
(
$this
->
params
[
'disc'
]))
{
$where
[
'disc'
]
=
$this
->
params
[
'disc'
];
}
/*状态 0待审批 1上架 2下架 3回收*/
if
(
!
empty
(
$this
->
params
[
'status'
]))
{
$where
[
'status'
]
=
$this
->
params
[
'status'
];
}
/*状态 0待审批 1上架 2下架 3回收*/
if
(
!
empty
(
$this
->
params
[
'status'
]))
{
$where
[
'status'
]
=
$this
->
params
[
'status'
];
}
/*价格 -1表示营业额扣点 存分*/
if
(
$this
->
params
[
'rent_price'
]
!=
NULL
)
{
switch
(
$this
->
params
[
'rent_price'
])
{
case
1
:
$where
[
'rent_price'
]
=
[
'>'
,
10000
];
break
;
case
2
:
$where
[
'rent_price'
]
=
[
'between'
,
'10000,30000'
];
break
;
default
:
$where
[
'rent_price'
]
=
[
'>'
,
'30000'
];
/*价格 -1表示营业额扣点 存分*/
if
(
$this
->
params
[
'rent_price'
]
!=
NULL
)
{
switch
(
$this
->
params
[
'rent_price'
])
{
case
1
:
$where
[
'rent_price'
]
=
[
'>'
,
10000
];
break
;
case
2
:
$where
[
'rent_price'
]
=
[
'between'
,
'10000,30000'
];
break
;
default
:
$where
[
'rent_price'
]
=
[
'>'
,
'30000'
];
}
}
}
/*对内楼盘名*/
if
(
$this
->
params
[
'internal_title'
]
!=
NULL
)
{
$where
[
'internal_title'
]
=
[
'LIKE'
,
$this
->
params
[
'internal_title'
]
.
'%'
];
}
/*对内楼盘名*/
if
(
$this
->
params
[
'internal_title'
]
!=
NULL
)
{
$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'
]
.
'%
'
];
}
/*是否独家0否1是*/
if
(
$this
->
params
[
'is_exclusive_type'
]
!=
NULL
)
{
$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'
];
}
/*开始时间*/
if
(
$this
->
params
[
'start_date'
]
!=
NULL
)
{
$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'
];
}
/*结束时间*/
if
(
$this
->
params
[
'end_date'
]
!=
NULL
)
{
$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'
];
}
/*开始结束时间*/
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'
];
}
/*根据库存判断是否已租*/
if
(
$this
->
params
[
'leased'
]
!=
NULL
)
{
if
(
$this
->
params
[
'leased'
]
==
0
)
{
$where
[
'residue_num'
]
=
0
;
}
else
{
$where
[
'residue_num'
]
=
[
'<>'
,
0
];
/*根据库存判断是否已租*/
if
(
$this
->
params
[
'leased'
]
!=
NULL
)
{
if
(
$this
->
params
[
'leased'
]
==
0
)
{
$where
[
'residue_num'
]
=
0
;
}
else
{
$where
[
'residue_num'
]
=
[
'<>'
,
0
];
}
}
}
/*业态*/
if
(
$this
->
params
[
'industry_type'
]
!=
NULL
)
{
$where
[
'industry_type'
]
=
[
'LIKE'
,
$this
->
params
[
'industry_type'
]
.
'%'
];
}
/*业态*/
if
(
$this
->
params
[
'industry_type'
]
!=
NULL
)
{
$where
[
'industry_type'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'industry_type'
]
.
'%'
];
}
//案场权限人搜索
if
(
empty
(
$params
[
'dish'
]))
{
/*楼盘编号*/
if
(
!
empty
(
$params
[
'id'
]))
{
$where
[
'id'
]
=
$params
[
'id'
];
//案场权限人搜索
if
(
empty
(
$params
[
'dish'
]))
{
/*楼盘编号*/
if
(
!
empty
(
$params
[
'id'
]))
{
$where
[
'id'
]
=
$params
[
'id'
];
}
$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
{
//盘方人搜索
/*楼盘编号*/
if
(
$params
[
'id'
]
!=
NULL
)
{
$where
[
'a.id'
]
=
$params
[
'id'
];
}
$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
);
}
$where
[
'status'
]
=
[
'<>'
,
3
];
$data
[
'data'
][
'list'
]
=
$this
->
house
->
getHouseList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$fields
,
$where
,
$this
->
userId
);
$data
[
'data'
][
'total'
]
=
$this
->
house
->
getTotal
(
$where
);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
else
{
//盘方人搜索
/*楼盘编号*/
if
(
$params
[
'id'
]
!=
NULL
)
{
$where
[
'a.id'
]
=
$params
[
'id'
];
}
$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
view
(
'houseList'
);
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
...
...
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