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
ddcb4c3e
Commit
ddcb4c3e
authored
Jun 04, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c99bf73f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
53 deletions
+12
-53
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+11
-52
OfficeService.php
application/index/service/OfficeService.php
+1
-1
No files found.
application/index/service/OfficeRoomService.php
View file @
ddcb4c3e
...
@@ -645,12 +645,7 @@ class OfficeRoomService
...
@@ -645,12 +645,7 @@ class OfficeRoomService
return
[
'status'
=>
200
,
'msg'
=>
'success'
,
'data'
=>
$result
];
return
[
'status'
=>
200
,
'msg'
=>
'success'
,
'data'
=>
$result
];
}
}
/**
//是否被收藏
* 是否被收藏
* @param $house_id
* @param $agent_id
* @return int
*/
private
function
isCollect
(
$house_id
,
$agent_id
){
private
function
isCollect
(
$house_id
,
$agent_id
){
$m_collect_room
=
new
OfficeACollectHouse
();
$m_collect_room
=
new
OfficeACollectHouse
();
//是否被收藏
//是否被收藏
...
@@ -667,9 +662,8 @@ class OfficeRoomService
...
@@ -667,9 +662,8 @@ class OfficeRoomService
}
}
return
$is_collect
;
return
$is_collect
;
}
}
/**
* 参考均价
//参考均价
*/
public
function
referenceAveragePrice
(
$id
){
public
function
referenceAveragePrice
(
$id
){
$field
=
'AVG(price) as num'
;
$field
=
'AVG(price) as num'
;
$where
[
'building_id'
]
=
$id
;
$where
[
'building_id'
]
=
$id
;
...
@@ -679,24 +673,14 @@ class OfficeRoomService
...
@@ -679,24 +673,14 @@ class OfficeRoomService
return
$reference_average_price
;
return
$reference_average_price
;
}
}
/**
//字段最低值
* 字段最低值
*
* @param $id
* @param $field
* @return float|int
*/
public
function
MinField
(
$id
,
$field
=
''
){
public
function
MinField
(
$id
,
$field
=
''
){
$where
[
'building_id'
]
=
$id
;
$where
[
'building_id'
]
=
$id
;
$field_string
=
"min(
{
$field
}
) as min"
;
$field_string
=
"min(
{
$field
}
) as min"
;
return
$this
->
m_office_room
->
getFieldOneValue
(
$field_string
,
$where
);
return
$this
->
m_office_room
->
getFieldOneValue
(
$field_string
,
$where
);
}
}
/**
//楼盘图
* 楼盘图
* @param $id
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getBuildingImage
(
$id
){
public
function
getBuildingImage
(
$id
){
$where
[
'img_status'
]
=
0
;
$where
[
'img_status'
]
=
0
;
$where
[
'house_id'
]
=
$id
;
$where
[
'house_id'
]
=
$id
;
...
@@ -710,11 +694,7 @@ class OfficeRoomService
...
@@ -710,11 +694,7 @@ class OfficeRoomService
return
$house_img_data
;
return
$house_img_data
;
}
}
/**
//轮播图
* 轮播图
* @param $id
* @return string
*/
public
function
getCarouselImage
(
$id
){
public
function
getCarouselImage
(
$id
){
$where
[
'img_status'
]
=
0
;
$where
[
'img_status'
]
=
0
;
$where
[
'house_id'
]
=
$id
;
$where
[
'house_id'
]
=
$id
;
...
@@ -728,11 +708,7 @@ class OfficeRoomService
...
@@ -728,11 +708,7 @@ class OfficeRoomService
return
$house_img_data
;
return
$house_img_data
;
}
}
/**
//交通信息
* 交通信息
* @param $id
* @return string
*/
public
function
getTrafficInfo
(
$id
){
public
function
getTrafficInfo
(
$id
){
$field
=
'b.line_name_simple,b.name,a.distance'
;
$field
=
'b.line_name_simple,b.name,a.distance'
;
$res
=
$this
->
m_building_stations
->
getTrafficInfo
(
$field
,
[
'a.building_id'
=>
$id
]);
$res
=
$this
->
m_building_stations
->
getTrafficInfo
(
$field
,
[
'a.building_id'
=>
$id
]);
...
@@ -740,12 +716,7 @@ class OfficeRoomService
...
@@ -740,12 +716,7 @@ class OfficeRoomService
return
$res_str
;
return
$res_str
;
}
}
/**
//房源数
* 房源数
* @param $building_id
* @param $id
* @return int|string
*/
public
function
getRoomNum
(
$building_id
,
$id
){
public
function
getRoomNum
(
$building_id
,
$id
){
$params
[
'building_id'
]
=
$building_id
;
$params
[
'building_id'
]
=
$building_id
;
$params
[
'id'
]
=
array
(
'eq'
,
$id
);
$params
[
'id'
]
=
array
(
'eq'
,
$id
);
...
@@ -755,11 +726,7 @@ class OfficeRoomService
...
@@ -755,11 +726,7 @@ class OfficeRoomService
return
$res
;
return
$res
;
}
}
/**
//获取上传人信息
* 获取上传人信息
* @param $agent_id
* @return array
*/
public
function
getUploadInfo
(
$agent_id
){
public
function
getUploadInfo
(
$agent_id
){
$agent
=
[];
$agent
=
[];
$redis_service
=
new
RedisCacheService
();
$redis_service
=
new
RedisCacheService
();
...
@@ -771,11 +738,7 @@ class OfficeRoomService
...
@@ -771,11 +738,7 @@ class OfficeRoomService
return
$agent
;
return
$agent
;
}
}
/**
//获取独家方
* 获取独家方
* @param $house_id
* @return array
*/
public
function
getExclusiveInfo
(
$house_id
){
public
function
getExclusiveInfo
(
$house_id
){
$exclusive_info
=
[];
$exclusive_info
=
[];
$params
[
'house_id'
]
=
$house_id
;
$params
[
'house_id'
]
=
$house_id
;
...
@@ -791,11 +754,7 @@ class OfficeRoomService
...
@@ -791,11 +754,7 @@ class OfficeRoomService
}
}
/**
//房东
* 房东
* @param $house_id
* @return array
*/
public
function
getLandlordInfo
(
$house_id
){
public
function
getLandlordInfo
(
$house_id
){
$m_landlord
=
new
OfficeGLandlordPhone
();
$m_landlord
=
new
OfficeGLandlordPhone
();
...
...
application/index/service/OfficeService.php
View file @
ddcb4c3e
...
@@ -342,7 +342,7 @@ class OfficeService
...
@@ -342,7 +342,7 @@ class OfficeService
//房源数
//房源数
$result
[
'room_num'
]
=
$this
->
getRoomNum
(
$result
[
'id'
]);
$result
[
'room_num'
]
=
$this
->
getRoomNum
(
$result
[
'id'
]);
//交通信息
//交通信息
$result
[
'traffic_info'
]
=
$this
->
getTrafficInfo
(
$result
[
'id'
]);
$result
[
'traffic_info'
]
=
$this
->
service_room
->
getTrafficInfo
(
$result
[
'id'
]);
//参考均价
//参考均价
$result
[
'reference_average_price'
]
=
$this
->
service_room
->
referenceAveragePrice
(
$id
);
$result
[
'reference_average_price'
]
=
$this
->
service_room
->
referenceAveragePrice
(
$id
);
...
...
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