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
dce4f690
Commit
dce4f690
authored
Jul 19, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
3d7e2824
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
ChatService.php
application/chat/service/ChatService.php
+4
-3
No files found.
application/chat/service/ChatService.php
View file @
dce4f690
...
@@ -403,7 +403,7 @@ class ChatService
...
@@ -403,7 +403,7 @@ class ChatService
$chatRelationModel
=
new
ChatRelation
();
$chatRelationModel
=
new
ChatRelation
();
$params
[
"target"
]
=
$target
;
$params
[
"target"
]
=
$target
;
$params
[
"from"
]
=
$target
;
$params
[
"from"
]
=
$target
;
$field
=
"a.id,a.to_id,a.from_id,a.create_time,b.type,b.id as user_or_agent_id,b.only_id,
$field
=
"a.id,a.to_id,a.from_id,a.create_time,b.type,b.
user_id,b.
id as user_or_agent_id,b.only_id,
c.name as agent_name,c.img,c.phone,d.user_name,d.user_phone,d.user_nick,d.user_pic,d.other_pic"
;
c.name as agent_name,c.img,c.phone,d.user_name,d.user_phone,d.user_nick,d.user_pic,d.other_pic"
;
$relationList
=
$chatRelationModel
->
getChatRelationInfo
(
$params
,
$field
);
$relationList
=
$chatRelationModel
->
getChatRelationInfo
(
$params
,
$field
);
...
@@ -413,6 +413,7 @@ class ChatService
...
@@ -413,6 +413,7 @@ class ChatService
$msgModel
=
new
ChatMsg
();
$msgModel
=
new
ChatMsg
();
foreach
(
$relationList
as
$key
=>
$item
)
{
foreach
(
$relationList
as
$key
=>
$item
)
{
$result
[
$key
][
"id"
]
=
$item
[
"id"
];
//关系id
$result
[
$key
][
"id"
]
=
$item
[
"id"
];
//关系id
$result
[
$key
][
"user_id"
]
=
$item
[
"user_id"
];
//关系id
//对方的only_id
//对方的only_id
if
(
$item
[
"from_id"
]
==
$target
)
{
if
(
$item
[
"from_id"
]
==
$target
)
{
...
@@ -432,8 +433,8 @@ class ChatService
...
@@ -432,8 +433,8 @@ class ChatService
}
}
//where
//where
$select_
[
"from"
]
=
$item
[
"from_id"
];
$select_
[
"from"
]
=
$item
[
"from_id"
];
$select_
[
"target"
]
=
$item
[
"to_id"
];
$select_
[
"target"
]
=
$item
[
"to_id"
];
//获取最后一条消息记录
//获取最后一条消息记录
$chat_info
=
$msgModel
->
getChatHistory
(
$select_
,
$fields
,
1
,
1
);
$chat_info
=
$msgModel
->
getChatHistory
(
$select_
,
$fields
,
1
,
1
);
...
...
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