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
017be333
Commit
017be333
authored
Jun 27, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
聊天获取办公楼信息
parent
2bd12b2c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
0 deletions
+58
-0
AppChat.php
application/chat/controller/AppChat.php
+31
-0
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+12
-0
OfficeGImg.php
application/model/OfficeGImg.php
+14
-0
route.php
application/route.php
+1
-0
No files found.
application/chat/controller/AppChat.php
View file @
017be333
...
...
@@ -15,11 +15,14 @@ use app\chat\extend\Basic;
use
app\chat\service\ChatService
;
use
app\chat\utils\RPush
;
use
app\extra\RedisPackage
;
use
app\index\service\OfficeRoomService
;
use
app\model\AAgents
;
use
app\model\ChatMsg
;
use
app\model\GHouses
;
use
app\model\GHousesImgs
;
use
app\model\MPushMessage
;
use
app\model\OfficeGImg
;
use
app\model\OfficeGRoom
;
use
app\model\Users
;
use
think\Cache
;
use
think\Exception
;
...
...
@@ -463,6 +466,34 @@ class AppChat extends Basic
}
/**
* 聊天获取办公楼信息
* @return \think\Response
*/
public
function
getOfficeRoomInfo
()
{
$params
=
$this
->
params
;
/*$params = array(
'id' => 1,
);*/
if
(
!
isset
(
$params
[
'id'
]))
{
return
$this
->
response
(
"300"
,
"参数不全"
);
}
$m_office_room
=
new
OfficeGRoom
();
$service_room
=
new
OfficeRoomService
();
$field
=
'b.title,a.area,a.price'
;
$result
=
$m_office_room
->
getOfficeRoomInfo
(
$field
,
[
'a.id'
=>
$params
[
'id'
]]);
if
(
$result
)
{
$result
[
'price'
]
=
$result
[
'price'
]
*
0.01
;
$result
[
'carousel_image'
]
=
$service_room
->
getCarouselImageByOne
(
$params
[
'id'
],
2
);
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
return
$this
->
response
(
"400"
,
"暂无数据!"
);
}
}
/**系统消息商铺修改消息
* @return \think\Response
*/
...
...
application/index/service/OfficeRoomService.php
View file @
017be333
...
...
@@ -773,6 +773,18 @@ class OfficeRoomService
}
return
$house_img_data
?
$house_img_data
:
[];
}
//轮播图一张
public
function
getCarouselImageByOne
(
$id
,
$img_type
=
2
)
{
$where
[
'img_type'
]
=
$img_type
;
$where
[
'img_status'
]
=
0
;
$where
[
'house_id'
]
=
$id
;
$house_img_data
=
$this
->
m_office_img
->
getOfficeRoomInfoImg
(
'id,img_name'
,
$where
);
if
(
$house_img_data
)
{
$house_img_data
[
'image_path'
]
=
$this
->
internet_path
.
$house_img_data
[
'img_name'
];
}
return
$house_img_data
?
$house_img_data
:
[];
}
//交通信息
public
function
getTrafficInfo
(
$id
)
...
...
application/model/OfficeGImg.php
View file @
017be333
...
...
@@ -88,6 +88,20 @@ class OfficeGImg extends BaseModel
->
select
();
}
/**
* 获取一张轮播图
* @param $field
* @param $where
* @return array|false|\PDOStatement|string|\think\Model
*/
public
function
getOfficeRoomInfoImg
(
$field
,
$where
)
{
$where
[
'img_status'
]
=
0
;
return
$this
->
db_
->
field
(
$field
)
->
where
(
$where
)
->
find
();
}
public
function
getCoverImage
(
$field
,
$where
)
{
$where
[
'img_status'
]
=
0
;
...
...
application/route.php
View file @
017be333
...
...
@@ -625,6 +625,7 @@ Route::group('chat', [
'addGroupManage'
=>
[
'chat/Group/addGroupManage'
,
[
'method'
=>
'post|get'
]],
'delGroupManage'
=>
[
'chat/Group/delGroupManage'
,
[
'method'
=>
'post|get'
]],
'pushMsg_gethouseinfo'
=>
[
'chat/AppChat/getHouseInfoByFrom'
,
[
'method'
=>
'post|get'
]],
'getOfficeRoomInfo'
=>
[
'chat/AppChat/getOfficeRoomInfo'
,
[
'method'
=>
'post|get'
]],
'getUserInfoByFrom'
=>
[
'chat/AppChat/getUserInfoByFrom'
,
[
'method'
=>
'post|get'
]],
'getChatRelation'
=>
[
'chat/AppChat/getChatRelation'
,
[
'method'
=>
'post|get'
]],
'getSystemMessageByShop'
=>
[
'chat/AppChat/getSystemMessageByShop'
,
[
'method'
=>
'post|get'
]],
...
...
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