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
8e1b7ab6
Commit
8e1b7ab6
authored
May 31, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
楼盘搜索
parent
e598f971
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
9 deletions
+110
-9
OfficeRoom.php
application/api_broker/controller/OfficeRoom.php
+31
-0
OfficeRoom.php
application/index/controller/OfficeRoom.php
+31
-0
OfficeService.php
application/index/service/OfficeService.php
+33
-0
OfficeBuildingRoomValidate.php
application/index/validate/OfficeBuildingRoomValidate.php
+1
-1
OfficeGRoom.php
application/model/OfficeGRoom.php
+7
-2
route.php
application/route.php
+7
-6
No files found.
application/api_broker/controller/OfficeRoom.php
View file @
8e1b7ab6
...
@@ -11,6 +11,8 @@ namespace app\api_broker\controller;
...
@@ -11,6 +11,8 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\index\service\OfficeRoomService
;
use
app\index\service\OfficeRoomService
;
use
app\index\service\OfficeService
;
use
app\model\OfficeGBuilding
;
class
OfficeRoom
extends
Basic
class
OfficeRoom
extends
Basic
{
{
...
@@ -101,4 +103,32 @@ class OfficeRoom extends Basic
...
@@ -101,4 +103,32 @@ class OfficeRoom extends Basic
return
$this
->
response
(
$result
[
'status'
],
$result
[
'msg'
],
$result
[
'data'
]);
return
$this
->
response
(
$result
[
'status'
],
$result
[
'msg'
],
$result
[
'data'
]);
}
}
/**
* 搜索楼盘
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBuildingSearch
()
{
$msg
=
''
;
$data
=
[];
$code
=
200
;
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$building_service
=
new
OfficeService
();
$result
=
$building_service
->
BuildingSearch
(
$pageNo
,
$pageSize
,
$this
->
params
);
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$msg
=
$result
[
'msg'
];
}
else
{
$data
=
$result
[
'data'
];
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
}
\ No newline at end of file
application/index/controller/OfficeRoom.php
View file @
8e1b7ab6
...
@@ -11,6 +11,7 @@ namespace app\index\controller;
...
@@ -11,6 +11,7 @@ namespace app\index\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\index\service\OfficeRoomService
;
use
app\index\service\OfficeRoomService
;
use
app\index\service\OfficeService
;
class
OfficeRoom
extends
Basic
class
OfficeRoom
extends
Basic
{
{
...
@@ -61,4 +62,33 @@ class OfficeRoom extends Basic
...
@@ -61,4 +62,33 @@ class OfficeRoom extends Basic
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$result_data
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$result_data
);
}
}
/**
* 搜索楼盘
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBuildingSearch
()
{
$msg
=
''
;
$data
=
[];
$code
=
200
;
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$building_service
=
new
OfficeService
();
$result
=
$building_service
->
BuildingSearch
(
$pageNo
,
$pageSize
,
$this
->
params
);
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$msg
=
$result
[
'msg'
];
}
else
{
$data
=
$result
[
'data'
];
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
}
\ No newline at end of file
application/index/service/OfficeService.php
View file @
8e1b7ab6
...
@@ -212,4 +212,36 @@ class OfficeService
...
@@ -212,4 +212,36 @@ class OfficeService
return
$data
;
return
$data
;
}
}
/**
* @param $page_size
* @param $page_no
* @param $params
* @return string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
BuildingSearch
(
$page_size
,
$page_no
,
$params
)
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
''
;
if
(
empty
(
$params
[
'title'
]))
{
$result
[
'msg'
]
=
'参数错误'
;
return
$result
;
}
if
(
empty
(
$params
[
'city'
]))
{
$result
[
'msg'
]
=
'参数错误'
;
return
$result
;
}
$field
=
'id,title,address'
;
$where
[
'title'
]
=
[
'LIKE'
,
'%'
.
$params
[
'title'
]
.
'%'
];
$where
[
'city'
]
=
$params
[
'city'
];
$data
=
$this
->
m_office
->
getList
(
$page_size
,
$page_no
,
''
,
$field
,
$where
);
$result
[
'data'
]
=
$data
;
$result
[
'status'
]
=
'successful'
;
return
$result
;
}
}
}
\ No newline at end of file
application/index/validate/OfficeBuildingRoomValidate.php
View file @
8e1b7ab6
...
@@ -27,7 +27,7 @@ class OfficeBuildingRoomValidate extends Validate
...
@@ -27,7 +27,7 @@ class OfficeBuildingRoomValidate extends Validate
'station_end'
=>
'require|between: 1,99999'
,
'station_end'
=>
'require|between: 1,99999'
,
'area'
=>
'require|between: 1,99999'
,
'area'
=>
'require|between: 1,99999'
,
'floor_tag'
=>
'require|in:1,2,3'
,
'floor_tag'
=>
'require|in:1,2,3'
,
'enter_
tim
e'
=>
'require'
,
'enter_
dat
e'
=>
'require'
,
'payment_month'
=>
'require|between:1,12'
,
'payment_month'
=>
'require|between:1,12'
,
'deposit_month'
=>
'require|between:1,12'
,
'deposit_month'
=>
'require|between:1,12'
,
'age_limit_start'
=>
'require|between:1,12'
,
'age_limit_start'
=>
'require|between:1,12'
,
...
...
application/model/OfficeGRoom.php
View file @
8e1b7ab6
...
@@ -47,6 +47,11 @@ class OfficeGRoom extends BaseModel
...
@@ -47,6 +47,11 @@ class OfficeGRoom extends BaseModel
$save_data
[
'floor'
]
=
(
int
)
$data
[
'floor'
];
$save_data
[
'floor'
]
=
(
int
)
$data
[
'floor'
];
}
}
//楼盘id
if
(
isset
(
$data
[
'building_id'
]))
{
$save_data
[
'building_id'
]
=
(
int
)
$data
[
'building_id'
];
}
//门牌号
//门牌号
if
(
isset
(
$data
[
'room_number'
]))
{
if
(
isset
(
$data
[
'room_number'
]))
{
$save_data
[
'room_number'
]
=
$data
[
'room_number'
];
$save_data
[
'room_number'
]
=
$data
[
'room_number'
];
...
@@ -103,8 +108,8 @@ class OfficeGRoom extends BaseModel
...
@@ -103,8 +108,8 @@ class OfficeGRoom extends BaseModel
}
}
//入住时间
//入住时间
if
(
isset
(
$data
[
'enter_
tim
e'
]))
{
if
(
isset
(
$data
[
'enter_
dat
e'
]))
{
$save_data
[
'enter_
time'
]
=
$data
[
'enter_tim
e'
];
$save_data
[
'enter_
date'
]
=
$data
[
'enter_dat
e'
];
}
}
//付款规则(按月)-付款
//付款规则(按月)-付款
...
...
application/route.php
View file @
8e1b7ab6
...
@@ -963,17 +963,17 @@ Route::group('office', [
...
@@ -963,17 +963,17 @@ Route::group('office', [
'getCommission'
=>
[
'api_broker/OfficeOrderLog/getCommission'
,
[
'method'
=>
'GET|POST'
]],
'getCommission'
=>
[
'api_broker/OfficeOrderLog/getCommission'
,
[
'method'
=>
'GET|POST'
]],
'isShowAdjustment'
=>
[
'api_broker/OfficeOrderLog/isShowAdjustment'
,
[
'method'
=>
'GET|POST'
]],
'isShowAdjustment'
=>
[
'api_broker/OfficeOrderLog/isShowAdjustment'
,
[
'method'
=>
'GET|POST'
]],
'addBargain'
=>
[
'api_broker/OfficeOrderLog/addBargain'
,
[
'method'
=>
'post'
]],
//新增成交报告佣金(分佣提成)
'addBargain'
=>
[
'api_broker/OfficeOrderLog/addBargain'
,
[
'method'
=>
'post'
]],
//新增成交报告佣金(分佣提成)
'houseEdit'
=>
[
'api_broker/OfficeRoom/edit'
,
[
'method'
=>
'POST'
]],
//楼盘字典新增和编辑
'houseEdit'
=>
[
'api_broker/OfficeRoom/edit'
,
[
'method'
=>
'POST
|GET
'
]],
//楼盘字典新增和编辑
'delHouseFile'
=>
[
'api_broker/OfficeRoom/delHouseFile'
,
[
'method'
=>
'POST'
]],
//删除楼盘图片
'get
OfficeRoomInfo'
=>
[
'api_broker/OfficeRoom/getOfficeRoomInfo'
,
[
'method'
=>
'POST'
]
],
//获取房源详情
'get
BuildingSearch'
=>
[
'api_broker/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
]);
]);
Route
::
group
(
'office_index'
,
[
Route
::
group
(
'office_index'
,
[
'houseAdd'
=>
[
'index/OfficeManage/add'
,
[
'method'
=>
'GET|POST'
]
],
//楼盘字典新增
'houseAdd'
=>
[
'index/OfficeManage/add'
,
[
'method'
=>
'GET|POST'
]
],
//楼盘字典新增
'houseEdit'
=>
[
'index/OfficeManage/edit'
,
[
'method'
=>
'GET|POST'
]
],
//楼盘字典编辑
'houseEdit'
=>
[
'index/OfficeManage/edit'
,
[
'method'
=>
'GET|POST'
]
],
//楼盘字典编辑
'delHouseFile'
=>
[
'index/OfficeManage/delHouseFile'
,
[
'method'
=>
'POST'
]
],
//删除楼盘图片
'delHouseFile'
=>
[
'index/OfficeManage/delHouseFile'
,
[
'method'
=>
'POST'
]
],
//删除楼盘图片
'houseDictionaryAdd'
=>
[
'index/OfficeManage/add'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典新增
'houseDictionaryEdit'
=>
[
'index/OfficeManage/edit'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典编辑
'getBuildingSearch'
=>
[
'index/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
]);
]);
//Route::miss('api/index/miss');//处理错误的url
//Route::miss('api/index/miss');//处理错误的url
\ No newline at end of file
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