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
83a8ac97
Commit
83a8ac97
authored
Jul 16, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
4a636242
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
ChatService.php
application/chat/service/ChatService.php
+4
-2
ChatRelation.php
application/model/ChatRelation.php
+1
-1
No files found.
application/chat/service/ChatService.php
View file @
83a8ac97
...
...
@@ -392,13 +392,13 @@ class ChatService
$params
[
"target"
]
=
$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,
c.name as agent_name,c.img,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
);
$result
=
[];
//dump($relationList);
$fields
=
"a.id,a.from_id,a.to_id,b.body,a.created_at"
;
$fields
=
"a.id,a.from_id,a.to_id,b.body,
b.type,
a.created_at"
;
$msgModel
=
new
ChatMsg
();
foreach
(
$relationList
as
$key
=>
$item
)
{
if
(
$item
[
"from_id"
]
==
$target
)
{
...
...
@@ -409,9 +409,11 @@ class ChatService
if
(
$is_user
==
0
)
{
$result
[
$key
][
"name"
]
=
empty
(
$item
[
"user_nick"
])
?
$item
[
"user_name"
]
:
$item
[
"user_nick"
];
$result
[
$key
][
"img"
]
=
empty
(
$item
[
"user_pic"
])
?
$item
[
"other_pic"
]
:
$item
[
"user_pic"
];
$result
[
$key
][
"phone"
]
=
$item
[
"user_phone"
];
}
else
{
$result
[
$key
][
"name"
]
=
$item
[
"agent_name"
];
$result
[
$key
][
"img"
]
=
$item
[
"img"
];
$result
[
$key
][
"phone"
]
=
$item
[
"phone"
];
}
$result
[
$key
][
"only_id"
]
=
$item
[
"only_id"
];
$select_
[
"from"
]
=
$item
[
"from_id"
];
...
...
application/model/ChatRelation.php
View file @
83a8ac97
...
...
@@ -87,7 +87,7 @@ class ChatRelation extends Model
$query
->
where
(
$whereOr_
);
})
->
select
();
//
echo $this->getLastSql();
echo
$this
->
getLastSql
();
return
$date
;
}
...
...
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