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
4f036d3d
Commit
4f036d3d
authored
Jun 05, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
dccaaa06
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
OfficeRoom.php
application/api_broker/controller/OfficeRoom.php
+1
-2
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+12
-11
OfficeGRoom.php
application/model/OfficeGRoom.php
+1
-2
No files found.
application/api_broker/controller/OfficeRoom.php
View file @
4f036d3d
...
@@ -260,8 +260,7 @@ class OfficeRoom extends Basic
...
@@ -260,8 +260,7 @@ class OfficeRoom extends Basic
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$result
=
$this
->
service
->
getMyBuildingRoom
(
$pageNo
,
$pageSize
,
$this
->
agentId
);
$result
=
$this
->
service
->
getMyBuildingRoom
(
$pageNo
,
$pageSize
,
$this
->
agentId
);
return
$this
->
response
(
$result
[
'status'
],
$result
[
'msg'
],
$result
[
'data'
]);
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
/**
/**
...
...
application/index/service/OfficeRoomService.php
View file @
4f036d3d
...
@@ -616,7 +616,7 @@ class OfficeRoomService
...
@@ -616,7 +616,7 @@ class OfficeRoomService
$result
=
$this
->
m_office_room
->
getOfficeRoomInfo
(
$field
,[
'a.id'
=>
$id
]);
$result
=
$this
->
m_office_room
->
getOfficeRoomInfo
(
$field
,[
'a.id'
=>
$id
]);
if
(
!
$result
)
{
if
(
!
$result
)
{
return
[
'status'
=>
101
,
'msg'
=>
'此房源不存在'
,
''
];
return
[
'status'
=>
101
,
'msg'
=>
'此房源不存在'
,
'
data'
=>
'
'
];
}
}
$result
[
'price'
]
=
$result
[
'price'
]
*
0.01
;
$result
[
'price'
]
=
$result
[
'price'
]
*
0.01
;
...
@@ -1112,19 +1112,20 @@ class OfficeRoomService
...
@@ -1112,19 +1112,20 @@ class OfficeRoomService
public
function
getMyBuildingRoom
(
$pageNo
,
$pageSize
,
$agentId
){
public
function
getMyBuildingRoom
(
$pageNo
,
$pageSize
,
$agentId
){
$m_office_room
=
new
OfficeGRoom
();
$m_office_room
=
new
OfficeGRoom
();
$field
=
"a.id,a.area,a.price_total,a.price,a.station_start,a.station_end,a.decoration"
;
$field
=
"a.id,a.area,a.price_total,a.price,a.station_start,a.station_end,a.decoration"
;
$params
[
"
b
.agent_id"
]
=
$agentId
;
$params
[
"
c
.agent_id"
]
=
$agentId
;
$params
[
"
b
.type"
]
=
2
;
$params
[
"
c
.type"
]
=
2
;
$params
[
"
b
.is_del"
]
=
0
;
$params
[
"
c
.is_del"
]
=
0
;
$res
=
$m_office_room
->
getMyBuildingRoom
(
$field
,
$params
,
$pageSize
,
$pageNo
);
$res
=
$m_office_room
->
getMyBuildingRoom
(
$field
,
$params
,
$pageSize
,
$pageNo
);
if
(
!
$res
)
{
return
[
'status'
=>
101
,
'msg'
=>
'此房源不存在'
,
'data'
=>
''
];
}
if
(
$res
){
foreach
(
$res
as
$k
=>
$v
)
{
foreach
(
$res
as
$k
=>
$v
)
{
$res
[
$k
][
'price_total'
]
=
$v
[
'price_total'
]
*
0.01
;
$res
[
$k
][
'price_total'
]
=
$v
[
'price_total'
]
*
0.01
;
$res
[
$k
][
'price'
]
=
$v
[
'price'
]
*
0.01
;
$res
[
$k
][
'price'
]
=
$v
[
'price'
]
*
0.01
;
// $res[$k]['cover_image'] = $this->getCoverImage($v['id']);
// $res[$k]['cover_image'] = $this->getCoverImage($v['id']);
}
}
}
return
$res
;
return
[
'status'
=>
200
,
'msg'
=>
'success'
,
'data'
=>
$res
]
;
}
}
/**
/**
...
...
application/model/OfficeGRoom.php
View file @
4f036d3d
...
@@ -276,13 +276,12 @@ class OfficeGRoom extends BaseModel
...
@@ -276,13 +276,12 @@ class OfficeGRoom extends BaseModel
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
'office_g_building b'
,
'a.building_id = b.id'
,
'left'
)
->
join
(
'office_g_building b'
,
'a.building_id = b.id'
,
'left'
)
->
join
(
'office_g_room_to_agent
b'
,
'a.id = b
.house_id'
,
'left'
)
->
join
(
'office_g_room_to_agent
c'
,
'a.id = c
.house_id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
order
(
$order_
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
select
();
->
select
();
return
$result
;
return
$result
;
}
}
...
...
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