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
8238b910
Commit
8238b910
authored
Jun 05, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的办公楼
parent
399e3aa1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
3 deletions
+70
-3
OfficeRoom.php
application/api_broker/controller/OfficeRoom.php
+16
-2
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+27
-0
OfficeService.php
application/index/service/OfficeService.php
+1
-1
OfficeGRoom.php
application/model/OfficeGRoom.php
+25
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/OfficeRoom.php
View file @
8238b910
...
@@ -97,9 +97,8 @@ class OfficeRoom extends Basic
...
@@ -97,9 +97,8 @@ class OfficeRoom extends Basic
return
$this
->
response
(
"101"
,
$checkResult
);
return
$this
->
response
(
"101"
,
$checkResult
);
}
}
$broker_service
=
new
OfficeRoomService
();
$id
=
$params
[
'id'
];
$id
=
$params
[
'id'
];
$result
=
$
broker_
service
->
getOfficeRoomInfo
(
$id
,
$this
->
agentId
);
$result
=
$
this
->
service
->
getOfficeRoomInfo
(
$id
,
$this
->
agentId
);
return
$this
->
response
(
$result
[
'status'
],
$result
[
'msg'
],
$result
[
'data'
]);
return
$this
->
response
(
$result
[
'status'
],
$result
[
'msg'
],
$result
[
'data'
]);
}
}
...
@@ -250,4 +249,18 @@ class OfficeRoom extends Basic
...
@@ -250,4 +249,18 @@ class OfficeRoom extends Basic
}
}
/**
* 我的办公楼-房源
* @return \think\Response
*/
public
function
getMyBuildingRoom
()
{
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$result
=
$this
->
service
->
getMyBuildingRoom
(
$pageNo
,
$pageSize
,
$this
->
agentId
);
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
}
\ No newline at end of file
application/index/service/OfficeRoomService.php
View file @
8238b910
...
@@ -1100,4 +1100,30 @@ class OfficeRoomService
...
@@ -1100,4 +1100,30 @@ class OfficeRoomService
}
}
return
$result
;
return
$result
;
}
}
/**
* 我的办公楼
* @param $pageNo
* @param $pageSize
* @param $agentId
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getMyBuildingRoom
(
$pageNo
,
$pageSize
,
$agentId
){
$m_office_room
=
new
OfficeGRoom
();
$field
=
"a.id,a.area,a.price_total,a.price,a.station_start,a.station_end,a.decoration"
;
$params
[
"b.agent_id"
]
=
$agentId
;
$params
[
"b.type"
]
=
2
;
$params
[
"b.is_del"
]
=
0
;
$res
=
$m_office_room
->
getMyBuildingRoom
(
$field
,
$params
,
$pageSize
,
$pageNo
);
if
(
$res
){
foreach
(
$res
as
$k
=>
$v
)
{
$res
[
$k
][
'price_total'
]
=
$v
[
'price_total'
]
*
0.01
;
$res
[
$k
][
'price'
]
=
$v
[
'price'
]
*
0.01
;
// $res[$k]['cover_image'] = $this->getCoverImage($v['id']);
}
}
return
$res
;
}
}
}
\ No newline at end of file
application/index/service/OfficeService.php
View file @
8238b910
...
@@ -377,7 +377,7 @@ class OfficeService
...
@@ -377,7 +377,7 @@ class OfficeService
}
}
//房源封面图
//房源封面图
p
rivate
function
getCoverImage
(
$id
){
p
ublic
function
getCoverImage
(
$id
){
if
(
CURRENT_URL
==
'https://api.tonglianjituan.com/'
)
{
if
(
CURRENT_URL
==
'https://api.tonglianjituan.com/'
)
{
$internet_path
=
IMAGES_URL
.
'/resource/lib/Attachments/images/'
;
$internet_path
=
IMAGES_URL
.
'/resource/lib/Attachments/images/'
;
}
else
{
}
else
{
...
...
application/model/OfficeGRoom.php
View file @
8238b910
...
@@ -261,6 +261,31 @@ class OfficeGRoom extends BaseModel
...
@@ -261,6 +261,31 @@ class OfficeGRoom extends BaseModel
return
$result
;
return
$result
;
}
}
/**
* 我的办公楼
* @param $field
* @param $params
* @param $pageSize
* @param $pageNo
* @param string $order_
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getMyBuildingRoom
(
$field
,
$params
,
$pageSize
,
$pageNo
,
$order_
=
'id desc'
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
'office_g_building b'
,
'a.building_id = b.id'
,
'left'
)
->
join
(
'office_g_room_to_agent b'
,
'a.id = b.house_id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
return
$result
;
}
/**
/**
* @param $page_no
* @param $page_no
* @param $page_size
* @param $page_size
...
...
application/route.php
View file @
8238b910
...
@@ -984,6 +984,7 @@ Route::group('office', [
...
@@ -984,6 +984,7 @@ Route::group('office', [
'reportListForPc'
=>
[
'api_broker/OfficeReport/reportListForPc'
,
[
'method'
=>
'get'
]],
'reportListForPc'
=>
[
'api_broker/OfficeReport/reportListForPc'
,
[
'method'
=>
'get'
]],
'getRoomListByReport'
=>
[
'api_broker/OfficeRoom/getRoomListByReport'
,
[
'method'
=>
'get|post'
]],
'getRoomListByReport'
=>
[
'api_broker/OfficeRoom/getRoomListByReport'
,
[
'method'
=>
'get|post'
]],
'addShopFollowUp'
=>
[
'api_broker/OfficeRoom/addShopFollowUp'
,
[
'method'
=>
'get|post'
]],
'addShopFollowUp'
=>
[
'api_broker/OfficeRoom/addShopFollowUp'
,
[
'method'
=>
'get|post'
]],
'getMyBuildingRoom'
=>
[
'api_broker/OfficeRoom/getMyBuildingRoom'
,
[
'method'
=>
'get|post'
]],
]);
]);
Route
::
group
(
'office_index'
,
[
Route
::
group
(
'office_index'
,
[
...
...
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