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
6b0c16fb
Commit
6b0c16fb
authored
Jun 03, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
房源详情
parent
51ebedcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
1 deletion
+62
-1
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+61
-1
OfficeGRoom.php
application/model/OfficeGRoom.php
+1
-0
No files found.
application/index/service/OfficeRoomService.php
View file @
6b0c16fb
...
@@ -10,6 +10,7 @@ namespace app\index\service;
...
@@ -10,6 +10,7 @@ namespace app\index\service;
use
app\api_broker\service\PushMessageService
;
use
app\api_broker\service\PushMessageService
;
use
app\api_broker\service\RedisCacheService
;
use
app\index\validate\OfficeBuildingRoomValidate
;
use
app\index\validate\OfficeBuildingRoomValidate
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\OfficeGBuilding
;
use
app\model\OfficeGBuilding
;
...
@@ -579,17 +580,76 @@ class OfficeRoomService
...
@@ -579,17 +580,76 @@ class OfficeRoomService
$conditions
[
'a.id'
]
=
$params
[
"id"
];
$conditions
[
'a.id'
]
=
$params
[
"id"
];
$field
=
'a.id'
;
$field
=
'a.id,b.title,a.price_total,a.price,a.station_start,b.type,a.station_end,a.area,a.floor,a.floor_tag,is_register
,a.age_limit_start,a.age_limit_end,a.rent_free,a.management_fee,a.slotting_fee,a.carport,a.enter_date,a.is_partition
,a.decoration,a.payment_month,a.deposit_month,a.source,a.create_time,a.operation_id,a.landlord_remark,a.fee_rule,
a.update_time,b.address'
;
$result
=
$this
->
m_office_room
->
getOfficeRoomInfo
(
$field
,
$conditions
);
$result
=
$this
->
m_office_room
->
getOfficeRoomInfo
(
$field
,
$conditions
);
if
(
!
$result
)
{
if
(
!
$result
)
{
return
[
'status'
=>
101
,
'msg'
=>
'此房源不存在'
];
return
[
'status'
=>
101
,
'msg'
=>
'此房源不存在'
];
}
}
#上传人
$result
[
'upload_info'
]
=
$this
->
getUploadInfo
(
$result
[
'operation_id'
]);
#独家方
$result
[
'exclusive_info'
]
=
$this
->
getExclusiveInfo
(
$result
[
'id'
]);
#房东
$result
[
'landlord_info'
]
=
$this
->
getLandlordInfo
(
$result
[
'id'
]);
return
[
'status'
=>
200
,
'msg'
=>
'success'
,
'data'
=>
$result
];
return
[
'status'
=>
200
,
'msg'
=>
'success'
,
'data'
=>
$result
];
}
}
/**
/**
* 获取上传人信息
* @param $agent_id
* @return array
*/
public
function
getUploadInfo
(
$agent_id
){
$agent
=
[];
$redis_service
=
new
RedisCacheService
();
$res
=
$redis_service
->
getRedisCache
(
2
,
$agent_id
);
if
(
$res
)
$agent
[
'name'
]
=
$res
[
'name'
];
$agent
[
'phone'
]
=
$res
[
'phone'
];
return
$agent
;
}
/**
* 获取独家方
* @param $house_id
* @return array
*/
public
function
getExclusiveInfo
(
$house_id
){
$exclusive_info
=
[];
$params
[
'house_id'
]
=
$house_id
;
$params
[
'type'
]
=
3
;
$params
[
'is_del'
]
=
0
;
$res
=
$this
->
agent_room
->
getAgentsByRoomId
(
'b.id,name,a.type,b.phone'
,
$params
);
if
(
$res
)
$exclusive_info
[
'name'
]
=
$res
[
'name'
];
$exclusive_info
[
'phone'
]
=
$res
[
'phone'
];
return
$exclusive_info
;
}
/**
* 房东
* @param $house_id
* @return array
*/
public
function
getLandlordInfo
(
$house_id
){
$m_landlord
=
new
OfficeGLandlordPhone
();
$landlord_info
=
[];
$res
=
$m_landlord
->
getAllList
(
'id,name,phone'
,
[
'house_id'
=>
$house_id
]);;
if
(
$res
)
$landlord_info
[
'id'
]
=
$res
[
'id'
];
$landlord_info
[
'name'
]
=
$res
[
'name'
];
$landlord_info
[
'phone'
]
=
$res
[
'phone'
];
return
$landlord_info
;
}
/*
* @param $params
* @param $params
* @return mixed
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DataNotFoundException
...
...
application/model/OfficeGRoom.php
View file @
6b0c16fb
...
@@ -231,6 +231,7 @@ class OfficeGRoom extends BaseModel
...
@@ -231,6 +231,7 @@ class OfficeGRoom extends BaseModel
{
{
$result
=
$this
->
field
(
$field
)
$result
=
$this
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
'office_g_building b'
,
'a.building_id=b.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
find
();
->
find
();
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